[issue11862] urlparse.ParseResult to have meaningful __str__

2011-04-28 Thread Senthil Kumaran
Senthil Kumaran added the comment: Éric, ParseResult is a class which provides tuple for urlparse/unparse. People should hardly (/never) use ParseResult directly. The original poster's concern was to get something like geturl() from this class which was not suitable and it should be obtained

[issue11862] urlparse.ParseResult to have meaningful __str__

2011-04-22 Thread Éric Araujo
Éric Araujo added the comment: Why couldn’t ParseResult call urlunparse to implement a useful __str__? -- components: +Library (Lib) -Extension Modules nosy: +eric.araujo versions: +Python 3.3 ___ Python tracker _

[issue11862] urlparse.ParseResult to have meaningful __str__

2011-04-18 Thread Senthil Kumaran
Senthil Kumaran added the comment: Tomasz, I think, you misunderstood the purpose of urlparse library. urlparse is for parsing the URL and into its components. The url could be a mailto:, svn+ssh or http,https. The requirement for parsing comes when you are designing systems which take up UR

[issue11862] urlparse.ParseResult to have meaningful __str__

2011-04-18 Thread Tomasz Melcer
Tomasz Melcer added the comment: If __str__ is meant to be a user-understandable way of expressing an URL, the best way to do that is to show it the same way user sees it in usually. This is now done by .geturl() call. This way I wouldn't have to remember to serialize it in cases where I want

[issue11862] urlparse.ParseResult to have meaningful __str__

2011-04-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: What would be a 'meaning' __str__ or __unicode__ of urlparse.urlparse and how would it be useful to you? I would think that people would except a tuple, list or a ParsedResult for such a call. I cannot understand the rational behind the expectation that

[issue11862] urlparse.ParseResult to have meaningful __str__

2011-04-17 Thread Tomasz Melcer
New submission from Tomasz Melcer : I find it a minor annoyance that a result of `urlparse.urlparse` (an object of class urlparse.ParseResult) doesn't have a meaningful __str__/__unicode__ methods. `urlparse.ParseResult` is a subclass of `namedtuple` with __slots__, so I can't easily add it, t