diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2012-10-01 12:53:43 -0700 |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2012-10-01 12:53:43 -0700 |
commit | 0098a5334c33f4ca504733df67e66fb762c9df1c (patch) | |
tree | 1128bd7321ce7c82333219f3fbf690aca5feef4f /Lib/pkgutil.py | |
parent | 42ad533dac5f08f8f113383fd03642f902c88105 (diff) | |
download | cpython-0098a5334c33f4ca504733df67e66fb762c9df1c.tar.gz |
utilize yield from
Diffstat (limited to 'Lib/pkgutil.py')
-rw-r--r-- | Lib/pkgutil.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index 8bdeb32e81..3117c17795 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -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=''): |