sorting a tuple

Simon Brunning SBrunning at trisystems.co.uk
Wed Nov 15 04:01:35 EST 2000


> From:	Tyler Eaves [SMTP:tyler at tylereaves.com]
> On another note, can
> someone please explain why you would use a tuple instead of a list. I
> have never quite figured that out.
 
Mainly, you use a tuple where you *can't* use a list - i.e. where you need
an immutable object. The most obvious example of this is the key value of a
dictionary - you can't use a list here, so use a tuple.

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk
Experience is what allows you to recognise a mistake the *second* time you
make it.




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.




More information about the Python-list mailing list