[docs] urlparse second example wrong output?

Catalin Patulea cat at vv.carleton.ca
Sun May 5 07:23:42 CEST 2013


In the second example for urlparse:
http://docs.python.org/3.4/library/urllib.parse.html?highlight=urlparse

>>> urlparse('www.cwi.nl/%7Eguido/Python.html')
ParseResult(scheme='', netloc='', path='www.cwi.nl:80/%7Eguido/Python.html',
           params='', query='', fragment='')

I think the "path=" component is wrong. ":80" shouldn't be there. Here
is what happens in 2.7:

In [2]: urlparse('www.cwi.nl/%7Eguido/Python.html')
Out[2]: ParseResult(scheme='', netloc='',
path='www.cwi.nl/%7Eguido/Python.html', params='', query='',
fragment='')


More information about the docs mailing list