[issue14592] old-style (level=-1) importing broken after importlib changes

Brett Cannon report at bugs.python.org
Tue Apr 17 18:03:25 CEST 2012


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

Detecting if you are in a package is as simple as ``'.' in __name__ or hasattr(mod, '__path__')`` or alternatively for the last guard, ``__name__ == __package__``.

As for the failure, I will have a look.

----------

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


More information about the Python-bugs-list mailing list