[issue36701] module 'urllib' has no attribute 'request'

Berker Peksag report at bugs.python.org
Tue Apr 23 03:55:09 EDT 2019


Berker Peksag <berker.peksag at gmail.com> added the comment:

What about other packages in the stdlib? For example, you can see the same behavior in the email package:

>>> import email
>>> email.message.EmailMessage()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'email' has no attribute 'message'

IMO, this is how imports work in Python and IIRC os.path is the only exception in the stdlib. I think this needs to be discussed on python-ideas first.

----------
nosy: +berker.peksag

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36701>
_______________________________________


More information about the Python-bugs-list mailing list