mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
utilize yield from
This commit is contained in:
parent
075bbb176f
commit
4993cc0a5b
11 changed files with 18 additions and 36 deletions
|
@ -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=''):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue