Re: Heterogeneous lists

2007-08-08 Thread Hendrik van Rooyen
"Gordon Airporte" > 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. I do it all the time - I only use tuples when I _have_ to. > It looks like whenever I need to group different objec

Re: Heterogeneous lists

2007-08-07 Thread faulkner
On Aug 7, 2:53 pm, Gordon Airporte <[EMAIL PROTECTED]> wrote: > 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. > It looks like whenever I need to group different objects I create a > class

Re: Heterogeneous lists

2007-08-07 Thread Tony
On Aug 7, 8:53 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: . > > I love my lists of classes. I know, I'll go to hell for that. > > -- > Jarek Zgodahttp://jpa.berlios.de/ And I love my shelved lists of classes.. Tony -- http://mail.python.org/mailman/listinfo/python-list

Re: Heterogeneous lists

2007-08-07 Thread Jarek Zgoda
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 differe

Re: Heterogeneous lists

2007-08-07 Thread Bruno Desthuilliers
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

Heterogeneous lists

2007-08-07 Thread Gordon Airporte
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. It looks like whenever I need to group different objects I create a class, if only so I can use more meaningful names than '[2]' for the items