Thoughts about Python

Michael Hudson mwh at python.net
Wed Feb 25 07:08:28 EST 2004


PPNTWIMBXFFC at spammotel.com (Marco Aschwanden) writes:

> > 
> > > *** Problem: tuples are not necessary
> > 
> > Says you!  Here's a hint: hash([]).
> > 
> > [...]
> 
> I suppose this is the argument: list are not immutable that is why
> they cannot be used a dict key... I wonder how many people use a tuple
> as dict key.

I do, on occasion.

> This seems to be a common practice to justify its own "type". I
> admit, I can think of simple workarounds when there wouldn't be
> tuples (eg. Instead of transforming a list into tuple why not
> transforming it into a string).

Oh yeah, transforming it into a string is really clean.

> > I think you might be expecting something other of Python than what it
> > is.  Nothing you suggest is completely ridiculous, just, well,
> > slightly un-Pythonic.
> 
> un-Pythonic... this bytes ... hmm... why? Reading your comments it
> does not justify such a hard judgment - or does it?

I was trying to be polite...

I've been reading this list for about six (eek!) years now.  You kind
of get used to posts like yours, and also to their posters realizing
that there is perhaps more sense behind Python's existing form than
they first imagine.

Cheers,
mwh

-- 
  (Unfortunately, while you get Tom Baker saying "then we 
   were attacked by monsters", he doesn't flash and make 
  "neeeeooww-sploot" noises.)
      -- Gareth Marlow, ucam.chat, from Owen Dunn's review of the year



More information about the Python-list mailing list