Death to tuples!
Peter Hansen
peter at engcorp.com
Mon Nov 28 18:50:56 EST 2005
Antoon Pardon wrote:
> Op 2005-11-28, Peter Hansen schreef <peter at engcorp.com>:
>>Mike Meyer wrote:
>>>Is there any place in the language that still requires tuples instead
>>>of sequences, except for use as dictionary keys?
>>
>>Would it be possible to optimize your "frozenlist" so that the objects
>>would be created during compilation time and rather than only during
>>runtime? If not then tuples() have a distinct performance advantage in
>>code like the following where they are used as local constants:
[snip code]
> I'm probably missing something, but what would be the problem if this
> list was created during compile time?
?? I was *asking* if there would be a problem doing that, not saying
there would be a problem. I think you misread or misunderstood something.
-Peter
More information about the Python-list
mailing list