[issue23203] Aliasing import of sub-{module, package} from the package raises AttributeError on import.

Nick Coghlan report at bugs.python.org
Thu Mar 22 08:24:45 EDT 2018


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Heh, apparently I forgot how IMPORT_FROM currently works some time between 2015 and 2017 :)

I agree this is out of date now, as the requested behaviour was already implemented for 3.7

----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
superseder:  -> Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23203>
_______________________________________


More information about the Python-bugs-list mailing list