> Two things come to mind. One, perhaps a more careful coding of urllib to > avoid exposing names it shouldn't export would be a better choice. Two, > perhaps those symbols that are not documented but that would be useful when > extending urllib functionality should be documented and added to __all__. > > Here are the non-module names I didn't include in urllib.__all__: Let me annotate these in-line: > MAXFTPCACHE No > localhost Yes > thishost Yes > ftperrors Yes > noheaders No > ftpwrapper No > addbase No > addclosehook No > addinfo No > addinfourl No > basejoin Yes > toBytes No > unwrap Yes > splittype Yes > splithost Yes > splituser Yes > splitpasswd Yes > splitport Yes > splitnport Yes > splitquery Yes > splittag Yes > splitattr Yes > splitvalue Yes > splitgophertype Yes > always_safe No > getproxies_environment No > getproxies Yes > getproxies_registry No > test1 No > reporthook No > test No > main No > > None are documented, so there are no guarantees if you use them (I have > subclassed addinfourl in the past myself). Note that there's a comment block "documenting" all the split*() functions, indicating that I intended them to be public. For the rest, I'm making a best guess based on how useful these things are and how closely tied to the implementation etc. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4