Re: Lists and Tuples

From: Fredrik Lundh (fredrik_at_pythonware.com)
Date: 12/05/03


Date: Fri, 5 Dec 2003 10:25:52 +0100
To: python-list@python.org

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>



Relevant Pages

  • Re: Fabian Nicieza hates Bendis? --
    ... Fabian wrote: ... quotes. ... sequence that says "They're dead!" ...
    (rec.arts.comics.marvel.universe)
  • Re: Scoring question
    ... that the sequences used for verifying whether stones are alive of dead ... And then both keep saying this, hence no stones get played and nothing ... sequence is started by the one that is trying to prove that a group is ... If he plays a dame point, then you play a dame point. ...
    (rec.games.go)
  • Re: When will C have an object model?
    ... tasks for which an object-oriented language is not wanted. ... I am asserting that C is not dead, and that it does not need an object ... between the posts you're quoting and your responses to them? ...
    (comp.lang.c)
  • Corrupt Registry, Cant detect hard disk. HELP!
    ... restart. ... Now, its dead. ... It has an error message that a file is missing or ... to do this sequence, but when I get to step 2 of part one, It wont work. ...
    (microsoft.public.windowsxp.help_and_support)
  • Corrupt Registry and Undetctable Disk Mayhem! SOS!
    ... restart. ... Now, its dead. ... It has an error message that a file is missing or ... to do this sequence, but when I get to step 2 of part one, It wont work. ...
    (microsoft.public.windowsxp.general)