[issue10226] urlparse example is wrong

2010-11-07 Thread R. David Murray
R. David Murray added the comment: Senthil, no it isn't. There is no way to know a priori that ':80' represents a port number rather than a path, absent the // introducer for the netloc. This bug is fixed; I ought to open a new one for the path thing but perhaps I will wait for a user report

[issue10226] urlparse example is wrong

2010-11-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed the wordings in r86296(py3k), r86297(release31-maint) and r86298(release27-maint). David, for the examples you mentioned, the first one's parsing logic follows the explanation that is written. It is correct. For the second example, the port value not

[issue10226] urlparse example is wrong

2010-10-30 Thread R. David Murray
R. David Murray added the comment: How about this: - If the scheme value is not specified, urlparse following the syntax - specifications from RFC 1808, expects the netloc value to start with '//', - Otherwise, it is not possible to distinguish between net_loc and path - component and would

[issue10226] urlparse example is wrong

2010-10-29 Thread Éric Araujo
Éric Araujo added the comment: // is not part of the netloc in RFC terms, it’s a delimiter between components -- nosy: +eric.araujo ___ Python tracker ___ __

[issue10226] urlparse example is wrong

2010-10-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: - Otherwise, it is not possible to distinguish between netloc and path - components, and would the indistinguishable component would be classified - as the path as in a relative URL. + If the netloc does not start with '//', the module cannot distinguis

[issue10226] urlparse example is wrong

2010-10-29 Thread Georg Brandl
Georg Brandl added the comment: That's for Senthil to rephrase as intended :) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10226] urlparse example is wrong

2010-10-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Oct 29, 2010 at 2:15 AM, Georg Brandl wrote: .. > I think this is correct: it is the new behavior after the fix for #754016 was > committed. > I agree. I kept the issue open because I cannot parse """ Otherwise, it is not possible to distingui

[issue10226] urlparse example is wrong

2010-10-28 Thread Georg Brandl
Georg Brandl added the comment: I think this is correct: it is the new behavior after the fix for #754016 was committed. -- nosy: +georg.brandl ___ Python tracker ___ _

[issue10226] urlparse example is wrong

2010-10-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks like I've been beaten again by make doctest picking up older python, but something is not right here: In Python 2.6.5: >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='www.cwi.nl', netloc='', path='80/%7Eguido/Python.html',

[issue10226] urlparse example is wrong

2010-10-28 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: d...@python -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue10226] urlparse example is wrong

2010-10-28 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : The following example in Doc/library/urlparse.rst is wrong >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='', netloc='', path='www.cwi.nl:80/%7Eguido/Python.html', params='', query='', fragment='') In the actual output