]> granicus.if.org Git - python/commitdiff
Issue #16120: Use |yield from| in stdlib.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 7 Oct 2012 20:21:15 +0000 (23:21 +0300)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 7 Oct 2012 20:21:15 +0000 (23:21 +0300)
Patch by Berker Peksag.

Lib/pkgutil.py

index 3117c1779584e7fa26be12ad757c5db51a09e4cf..c695cf10815282ba10fb87801fac251be87a9956 100644 (file)
@@ -455,8 +455,7 @@ def iter_importers(fullname=""):
         if path is None:
             return
     else:
-        for importer in sys.meta_path:
-            yield importer
+        yield from sys.meta_path
         path = sys.path
     for item in path:
         yield get_importer(item)