Heterogeneous lists

Jarek Zgoda jzgoda at o2.usun.pl
Tue Aug 7 15:53:16 EDT 2007


Bruno Desthuilliers napisał(a):

> Gordon Airporte a écrit :
>> This is one of those nice, permissive Python features but I was
>> wondering how often people actually use lists holding several
>> different types of objects.
> 
> Depends on the definition of 'type'. I often have instances of different
> - possibly unrelated - classes in a same list. Fact is that these
> instances usually share a common (implied) interface, but, well,
> sometimes they don't...

I love my lists of classes. I know, I'll go to hell for that.

-- 
Jarek Zgoda
http://jpa.berlios.de/



More information about the Python-list mailing list