utilize yield from

This commit is contained in:
Philip Jenvey 2012-10-01 12:53:43 -07:00
parent 075bbb176f
commit 4993cc0a5b
11 changed files with 18 additions and 36 deletions

View file

@ -121,8 +121,7 @@ def walk_packages(path=None, prefix='', onerror=None):
# don't traverse path items we've seen before
path = [p for p in path if not seen(p)]
for item in walk_packages(path, name+'.', onerror):
yield item
yield from walk_packages(path, name+'.', onerror)
def iter_modules(path=None, prefix=''):