Range Operation pre-PEP

Fredrik Lundh fredrik at pythonware.com
Fri May 11 20:47:36 EDT 2001


In the dumbest subthread in quite a while, someone wrote:

> Perhaps you should treat people who disagree with you with more
> respect.

when you deserve it.

> > if you're so experienced in Python as you say you are, maybe you can
> > prove me wrong, by posting some code where you use lists and tuples
> > the "wrong" way, and show that it won't work better if done the
> > other way around.
>
> I don't have to post any code

didn't expect you to.  putting some weight behind your
words isn't exactly your style.

> I can just refer you to way Python itself works.  Why do excess
> parameters get put into a tuple rather than a list?

yeah, why?

is it because tuples are immutable (which was your main
argument until you decided to tilt at another windmill)? if
so, how come python's using *mutable* dictionaries for
keyword args?

or is it because excess arguments are more important than
ordinary argument lists, and thus have influenced the whole
design?  do you really believe that?

or is it because tuples are more efficient when the number
of arguments is known at construction time (i.e when the
function is called)?  if so, you just proved my point.

or maybe it's just an historical implementation artifact, and
has nothing to do with the intended use of tuples vs. lists.

> Excess parameters are not of a fixed length, and they are more
> typically homogeneous than heterogeneous

oh, you really do believe that.





More information about the Python-list mailing list