[issue17636] Modify IMPORT_FROM to fallback on sys.modules

Nick Coghlan report at bugs.python.org
Sun Apr 14 09:51:52 CEST 2013


Nick Coghlan added the comment:

Thanks for working through that Phillip - falling back to sys.modules when the expected attribute was missing is actually something I suggested as a possibility years ago, and Guido's response at the time was "If it was that easy, someone would have done it already".

Your analysis is one of the pieces that was missing, along with Brett's insight that the code that needs the fallback is the IMPORT_FROM bytecode rather than the import implementation.

I'm going to close the original circular import bug as being superseded by this one.

----------
nosy: +ncoghlan

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


More information about the Python-bugs-list mailing list