Easy immutability in python?

jess.austin at gmail.com jess.austin at gmail.com
Sat Mar 4 21:15:48 CET 2006

I guess we think a bit differently, and we think about different
problems.  When I hear, "immutable container", I think "tuple".  When I
hear, "my own class that is an immutable container", I think, "subclass
tuple, and probably override __new__ because otherwise tuple would be
good enough as is".

I'm not sure how this relates to the clp thread that you cite.  I
didn't read the whole thing, but I didn't find it to be a flamewar so
much as a typical clp contest of tedium, which failed to devolve into a
flamewar simply due to the maturity of the interlocutors.  To
summarize: first post is a use case, second post is an implementation
of that use case, and subsequent posts alternate between "that's not
how I want to do it" and "please provide a more specific use case for
which the provided implementation is not acceptable".

good luck,

More information about the Python-list mailing list