Range Operation pre-PEP

Fredrik Lundh fredrik at pythonware.com
Fri May 11 12:51:54 CEST 2001


Douglas Alan keeps on babbling:

> >> In what way did I misrepresent Ben's original claim?  I did not.
>
> > you wrote:
>
> >> Ben claimed that tuples should only be used when you know how many
> >> elements there will be, and that lists should only be used for
> >> homogeneous data of unknown length.
>
> > ben didn't use "should only".  you made that up.
>
> I did not.  It is clear from the context that this is what he
> intended.

did you read his followup message?  you're saying that "lists
are normally used" is the same thing as "lists should only be
used"?  that's weird.

(but alright, his followup was in response to someone who
basically agreed with him, so maybe you didn't bother to read
further down that thread...)

maybe we should ask him: Ben, did you really mean that Python
won't let you abuse lists and tuples?  or where you just describing
a well-known best practice?

> > no, I'm saying that anyone who has written or studied real-life
> > python programs knows that tuples don't work well as containers, and
> > lists don't work well if you try to use them as records.  that's a
> > fact, not an opinion.
>
> A fact, eh?  And would you be so kind as to explain this fact.

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.

(where "better" means better from a software engineering perspective:
performance, memory usage, code size, readability, support for different
python versions, scalability, maintainability, etc).

> When have I ever "trolled"?  I have only expressed my opinion, which
> is reasonably well-informed, and, I think, worth considering.

good for you.

Cheers /F





More information about the Python-list mailing list