diff Lib/importlib/_bootstrap.py @ 55766:08090b5e96c2

Allow importlib.__import__ to accept any iterable for fromlist. Discovered when running importlib against test___all__.
author Brett Cannon <bcannon@gmail.com>
date Sun, 30 Aug 2009 18:28:46 +0000
parents e4c2cbd3bf93
children 368bfc18a7a1
line wrap: on
line diff
--- a/Lib/importlib/_bootstrap.py	Sun Aug 30 08:39:57 2009 +0000
+++ b/Lib/importlib/_bootstrap.py	Sun Aug 30 18:28:46 2009 +0000
@@ -943,6 +943,7 @@
         # If a package was imported, try to import stuff from fromlist.
         if hasattr(module, '__path__'):
             if '*' in fromlist and hasattr(module, '__all__'):
+                fromlist = list(fromlist)
                 fromlist.remove('*')
                 fromlist.extend(module.__all__)
             for x in (y for y in fromlist if not hasattr(module,y)):