X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/40300f9ea7fc541bd5f3878d98d4ff0ca4873d9c..c8551bf2e5b4f33200ca91b6e8c4cf4a5fc109ee:/pokedex/__init__.py?ds=sidebyside diff --git a/pokedex/__init__.py b/pokedex/__init__.py index 4af3fa0..ccffaf2 100644 --- a/pokedex/__init__.py +++ b/pokedex/__init__.py @@ -66,8 +66,17 @@ def command_lookup(name): else: print "Fuzzy-matched:" - for object, language, exact in results: - print object.__tablename__, object.name, language + for result in results: + if hasattr(result.object, 'full_name'): + name = result.object.full_name + else: + name = result.object.name + + print "%s: %s" % (result.object.__tablename__, name), + if result.language: + print "(%s in %s)" % (result.name, result.language) + else: + print def command_help():