[issue19211] from relative_module import seems to import wrong module

2013-10-09 Thread Ethan Glasser-Camp
New submission from Ethan Glasser-Camp: I have a library lib. lib/__init__.py does the following: from .subdir import a from . import a import sys print(sys.modules['lib.a']) This code fails with a KeyError. It seems that despite the second line, lib.a does not get imported

[issue19211] from relative_module import seems to import wrong module

2013-10-09 Thread Ethan Glasser-Camp
Ethan Glasser-Camp added the comment: Thanks for the explanation. I had a feeling I was overlooking something obvious but couldn't figure out what it was. Feel free to close as invalid. -- ___ Python tracker rep...@bugs.python.org http