[issue39637] Probably incorrect message after failed import
Rick van Rein
report at bugs.python.org
Sat Feb 15 06:23:56 EST 2020
New submission from Rick van Rein <rick at openfortress.nl>:
The following error message surprises me:
>>> import os.environ
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'os.environ'; 'os' is not a package
Shouldn't that say that "'environ' is not a package" instead?
After all, 'os' will support
>>> import os.path
>>>
This is confusing :)
----------
components: Interpreter Core
messages: 362011
nosy: vanrein
priority: normal
severity: normal
status: open
title: Probably incorrect message after failed import
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39637>
_______________________________________
More information about the Python-bugs-list
mailing list