[issue19257] Sub-optimal error message when importing a non-package

Brett Cannon report at bugs.python.org
Thu Mar 13 14:09:12 CET 2014


Brett Cannon added the comment:

Is it confusing though? If you only had the latter exception all you would know is Python doesn't consider datetime a package but you wouldn't know why that is unless you knew the exact definition (the __path__ attribute exists). Having the former exception helps make that a bit more obvious if you didn't already know it.

----------
versions: +Python 3.5 -Python 3.4

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


More information about the Python-bugs-list mailing list