[issue15824] mutable urlparse return type

Senthil Kumaran report at bugs.python.org
Thu Aug 30 20:38:27 CEST 2012


Senthil Kumaran added the comment:

On Thu, Aug 30, 2012 at 11:17 AM, mastahyeti <report at bugs.python.org> wrote:
>
> When parsing a url with urlparse.urlparse, the return type is non-mutable (named tuple). This is really inconvenient, because one of the most common (imop) use cases for urlparse is to parse a url, make an adjustment or change and then unparse it. Currently, something like this is required:

Not actually, using the namedtuple is a convenience and working
through way may help you to be generate your target url in a more
meaningful way. Also remember that we moved to namedtuple after
understanding that it is more meaningful to use that for parsed
result.  So, my vote for this proposal is -1. And if you need discuss
the strategies of how to use it, then you can ask over at python-help
or related lists.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15824>
_______________________________________


More information about the Python-bugs-list mailing list