[issue17636] Modify IMPORT_FROM to fallback on sys.modules

Kristján Valur Jónsson report at bugs.python.org
Wed Jun 5 17:49:57 CEST 2013


Kristján Valur Jónsson added the comment:

sorry, the last example really needs to be:
#module foo.B
A = __import__(".A", fromlist=["dummy"])

to invoke the "return final module" behaviour.
Hm, maybe this simply works...  I didn't test....
Nope, I get
ValueError: Empty module name (in 2.7)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17636>
_______________________________________


More information about the Python-bugs-list mailing list