New submission from Antonio Cota: That's the situation:
a/ __init__.py first.py second.py #init.py __all__ = ['second', 'first'] print('i\'m starting the directory') #first.py print('hi, i\'m the first') from . import * #second.py print('hi, i\'m the second') >From the interactive prompt: >>> import a.first i'm starting the directory hi, i'm the first hi, i'm the second Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/antox/Scrivania/a/first.py", line 2, in <module> from . import * AttributeError: module 'a' has no attribute 'first' It's pretty weird. ---------- messages: 235761 nosy: antox priority: normal severity: normal status: open title: Relative imports with __all__ attribute type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23447> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com