[Python-ideas] issue15824

Simon Sapin simon.sapin at kozea.fr
Mon Sep 10 11:21:49 CEST 2012


Le 30/08/2012 21:51, Serhiy Storchaka a écrit :
> On 30.08.12 22:03, Ben Toews wrote:
>> I think this is really clunky. I don't see any reason why we should be
>> using a type that doesn't support item assignment and needs to be
>> casted to a another type in order to make changes.
>
> Mutable urlparse result is backward incompatible. For now this result
> can be used as dict key.


Note that namedtuples *are* immutables, but they have a _replace method 
that returns a new namedtuple.

This method could also be extended to handle the properties that are 
computed dynamically (username, password, host, port).

Regards,
-- 
Simon Sapin



More information about the Python-ideas mailing list