[issue13977] importlib simplification

Brett Cannon report at bugs.python.org
Fri Feb 17 15:20:53 CET 2012


Brett Cannon <brett at python.org> added the comment:

So I simply swapped out the code and the tests fail. Then I realized why: while the assumption is right, that does not mean that that name passed to __import__() isn't relative and thus shifts what need to be returned (the else clause case). That's why it's a slice off of __name__ based on name itself; name is some funky tail section of __name__ for relative imports.

----------
resolution:  -> invalid
status: open -> closed

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


More information about the Python-bugs-list mailing list