X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/6e38dbde8fd732d4fea4b764fa434a3ce94d3039..4fe48baffb5156027c6d186308998412554a6906:/pokedex/__init__.py diff --git a/pokedex/__init__.py b/pokedex/__init__.py index 3908d8d..89ad673 100644 --- a/pokedex/__init__.py +++ b/pokedex/__init__.py @@ -164,10 +164,14 @@ def lookup(engine_uri, name): # XXX don't require uri! somehow session = connect(engine_uri) - results = pokedex_lookup(session, name) - print "Matched:" - for object, matchiness in results: - print object.__tablename__, object.name, "(%.03f)" % matchiness + results, exact = pokedex_lookup(session, name) + if exact: + print "Matched:" + else: + print "Fuzzy-matched:" + + for object in results: + print object.__tablename__, object.name def help():