[New-bugs-announce] [issue36701] module 'urllib' has no attribute 'request'
Piyush
report at bugs.python.org
Tue Apr 23 01:56:21 EDT 2019
New submission from Piyush <piyushsinghkgpian at gmail.com>:
The current way to use one of `urllib.request` APIs is like this:
```
import urllib.request
urllib.request.urlretrieve
```
Can we change this to:
```
import urllib
urllib.request.urlretrieve
```
This will require adding 1 line at https://github.com/python/cpython/blob/master/Lib/urllib/__init__.py
This is required because help on `urllib` says that `request` is part of `urllib` suggesting that `urllib.request` should be available if I `import urllib`.
Moreover `import urllib.request` is not at all intuitive.
I can submit a PR if other's think what I'm proposing makes sense.
----------
files: Screen Shot 2019-04-23 at 11.22.48 AM.png
messages: 340690
nosy: piyush-kgp
priority: normal
severity: normal
status: open
title: module 'urllib' has no attribute 'request'
versions: Python 3.6
Added file: https://bugs.python.org/file48283/Screen Shot 2019-04-23 at 11.22.48 AM.png
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36701>
_______________________________________
More information about the New-bugs-announce
mailing list