Lists and Tuples
Fredrik Lundh
fredrik at pythonware.com
Fri Dec 5 04:25:52 EST 2003
Douglas Alan wrote:
> I disagree. You should use a tuple when you wish to not change the
> contents once you have constructed the sequence, and otherwise you
> should use a list.
> Fredrik Lundh actually called me names a couple years back for
> asserting this, but Python luminary (and rude fellow) or not, he is
> dead wrong.
I'm never dead wrong.
Guido van Rossum, "State of the Python Union", March 2003:
http://www.python.org/doc/essays/ppt/pycon2003/pycon2003.ppt
...
+ It's a matter of user education
+ Example: lists vs. tuples
this is often misrepresented as "tuple are readonly lists",
which is *wrong*
use cases are quite different
*but*... tuples also usable as readonly lists
...
I expect an apology.
</F>
More information about the Python-list
mailing list