lists v. tuples

Duncan Booth duncan.booth at invalid.invalid
Tue Mar 18 22:34:44 CET 2008


castironpi at gmail.com wrote:

>> > > On Mar 17, 1:31 pm, Duncan Booth <duncan.bo... at invalid.invalid>
>> > > wrote: 
>>
>> > >> A common explanation for this is that lists are for homogenous
>> > >> collections, tuples are for when you have heterogenous
>> > >> collections i.e. related but different things.
>>
>> > > I interpret this as meaning that in a data table, I should have a
>> > > list of records but each record should be a tuple of fields,
>> > > since the fields for a table usually have different forms whereas
>> > > the records usually all have the same record layout.
>>
>> >>> b in b
>> False
> 
> That's actually interesting.

Just for the avoidance of doubt, I didn't write the 'b in b' line: 
castironpi is replying to himself without attribution.

P.S. I still don't see the relevance of any of castironpi's followup to my 
post, but since none it made any sense to me I guess it doesn't matter.



More information about the Python-list mailing list