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
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