Kristján Valur Jónsson added the comment:
Interesting.
And I can report that it works, in 2.7, with code such as
b = importlib.import_module("..b", __name__)
and
a = importlib.import_module("..a", __name__)
Still, it seems odd that a whole "importlib" is requried ot resolve the
relative import, and that it doesn"t work with __import__, given how
"supposedly" the import statement is supposed to translate to a __import__ call
internally. One would think that __import__ had access to the relative path
machinery somehow.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17636>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com