Tuples -- who needs 'em

Fredrik Lundh effbot at telia.com
Tue Apr 4 13:09:14 EDT 2000


Hrvoje Niksic <hniksic at iskon.hr> wrote:
> "Fredrik Lundh" <effbot at telia.com> writes:
>
> > -- tuples can be used as dictionary keys.  mutable collections can
> >    not.
>
> This is wrong.

this is why it usually takes more than one iteration to come up
with a watertight specification.

yeah, you're right -- python allows you to pretend that a mutable
collection class isn't really that mutable...

...just like tuples are basically lists that pretend they're not really
mutable (okay, CPython stores tuples in a slightly more efficient
ways, but that's an optimization)

> > -- good designers know that hypergeneralization tends to be a bad
> >    idea.
>
> ...and this is arm-waiving.

oh, I don't know.  I've designed stuff for some 20 years, and I've
seen way too many failed attempts to design overly general stuff
(even when the designers succeed, it can take ages for ordinary
users to catch up -- just witness SGML vs. XML vs. SML vs. good
old text files...).

but maybe it's just me.

</F>





More information about the Python-list mailing list