You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
urllib.splithost() and .splittype() are included in urllib's __all__ but
are not documented in urllib's module documentation. They are used
quite extensively in the module so they should be documented
There are quite a lot more functions in __all__, more than 10 split*
functions... should they all be documented?
Also, isn't urlparse meant to do such tasks?
I agree. I too feel that not everything in the __all__ list should be
documented. And in this specific case of splithost, it is more appropriate for
the user to use urlparse.
When internal functions lack '_', perhaps the doc should say "xys,uie, and ooe are intentionally undocumented internal functions." Otherwise, how is one supposed to know?
I had added a note in the documentation c3656dca65e7 conveying that splittype, splithost should not be relied upon, and urlparse should be used for parsing. Also, Python3 does not include these in __all__ - It is in Python2 for backwards compatibility purposes. It is not possible provide deprecation warning to things we leave off from __all__ from subsequent versions of python.
I consider this request as resolved. Thanks!
Activity
warsaw commentedon Jan 2, 2008
urllib.splithost() and .splittype() are included in urllib's __all__ but
are not documented in urllib's module documentation. They are used
quite extensively in the module so they should be documented
birkenfeld commentedon Jan 7, 2008
There are quite a lot more functions in __all__, more than 10 split*
functions... should they all be documented?
Also, isn't urlparse meant to do such tasks?
orsenthil commentedon Jan 9, 2008
I agree. I too feel that not everything in the __all__ list should be
documented. And in this specific case of splithost, it is more appropriate for
the user to use urlparse.
terryjreedy commentedon Aug 7, 2010
When internal functions lack '_', perhaps the doc should say "xys,uie, and ooe are intentionally undocumented internal functions." Otherwise, how is one supposed to know?
plasticgap commentedon Apr 28, 2013
This has been fixed in trunk, the split* methods have documentation and appear in the module docs.
python-dev commentedon May 2, 2013
New changeset c3656dca65e7 by Senthil Kumaran in branch '2.7':
\bpo-1722 - Add a note on urllib helper functions like splittype, splithost etc.
http://hg.python.org/cpython/rev/c3656dca65e7
orsenthil commentedon May 2, 2013
I had added a note in the documentation c3656dca65e7 conveying that splittype, splithost should not be relied upon, and urlparse should be used for parsing. Also, Python3 does not include these in __all__ - It is in Python2 for backwards compatibility purposes. It is not possible provide deprecation warning to things we leave off from __all__ from subsequent versions of python.
I consider this request as resolved. Thanks!