Tuple comprehension
Magnus Lie Hetland
mlh at vier.idi.ntnu.no
Thu Apr 11 22:27:41 EDT 2002
In article <mailman.1018541080.13442.python-list at python.org>, Sean
'Shaleh' Perry wrote:
>>
>> Ah...I think I understand your perspective a little better now. I never
>> think of a tuple as a list that's immutable, so I don't encounter very
>> often the same population problem. To me, lists become immutable when I
>> give them names in all caps, just like my variables become constants when
>> I name them that way.
>>
>
>I do similar things, but using the language to help prevent mistakes is handy
>when I give people modules to use in their own code.
>
I think the only _real_ reason to have tuples at all is that they are
immutable (and therefore usable as dictionary keys). And a slight
efficiency advantage over lists, maybe...
--
Magnus Lie Hetland The Anygui Project
http://hetland.org http://anygui.org
More information about the Python-list
mailing list