-def find(seq, *, item=None, match=None, key=None, default=LookupError):
+def pfxmatch(pfx, item):
+ return str(item)[:len(pfx)] == pfx
+
+class ambiguous(LookupError):
+ def __init__(self, a, b):
+ super().__init__("ambigous match: %s and %s" % (a, b))
+ self.a = a
+ self.b = b
+
+def find(seq, *, item=None, test=None, match=None, key=None, default=LookupError):