This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mastahyeti
Recipients ezio.melotti, mastahyeti, orsenthil, r.david.murray
Date 2012-08-30.18:58:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAE=pOyGshweDnk-Ozb1cy=hD6Dfzwo-E_GiAf+eu2hDAPYJmKg@mail.gmail.com>
In-reply-to <CAPOVWORZ8rfvJxrk4yLqVg2TYK-A2Oq0aMLq=11nPLVcMsJcXg@mail.gmail.com>
Content
Senthil,
Can you give an example of how namedtuple would be more convenient? It
is definitely more convenient than an ordinary tuple, but its
inconvenient having its items not be assignable. As I showed in my
example above, it is usable as-is, but it is clunky. As David says
above, this obviously needs to be moved to another list for discussion
of whether the current behavior is desirable.

On Thu, Aug 30, 2012 at 1:38 PM, Senthil Kumaran <report@bugs.python.org> wrote:
>
> Senthil Kumaran added the comment:
>
> On Thu, Aug 30, 2012 at 11:17 AM, mastahyeti <report@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@bugs.python.org>
> <http://bugs.python.org/issue15824>
> _______________________________________
History
Date User Action Args
2012-08-30 18:58:07mastahyetisetrecipients: + mastahyeti, orsenthil, ezio.melotti, r.david.murray
2012-08-30 18:58:07mastahyetilinkissue15824 messages
2012-08-30 18:58:07mastahyeticreate