tuples vs lists

Ivan Voras ivoras at fer.hr
Tue Sep 16 15:16:50 EDT 2003


Peter Hansen wrote:
> Ivan Voras wrote:
>>
>> Ok, I gather touples should be smaller & faster as I thought :)
>
> Don't make a decision based on performance.  Use tuples if you
> require the immutability, or if you want to follow Guido's "advice"
> (?) to treat them as simple unnamed structs.

I know that. I was just wandering if they also behave faster. Lists are only
interesting to me in case I need mutability.


-- 
-- 
Every sufficiently advanced magic is indistinguishable from technology
   - Arthur C Anticlarke






More information about the Python-list mailing list