Nick Coghlan <ncogh...@gmail.com> added the comment:

I believe the original rationale for the `__path__` check was to restrict that 
branch to the case where we may need to import a not-yet-imported submodule in 
order to get the attribute set appropriately.

However, giving a better error message for __all__ in ordinary modules also 
seems like a good reason to follow that branch.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32932>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to