Brett Cannon <br...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue13977> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com