Heterogeneous lists

faulkner faulkner891 at gmail.com
Tue Aug 7 17:52:11 EDT 2007


On Aug 7, 2:53 pm, Gordon Airporte <JHoo... at fbi.gov> 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, if only so I can use more meaningful names than '[2]' for the items.
> How often do these show up in your code?
> Is this simply the upshot of the underlying arrays holding only object
> references of some sort?

how else would you implement an n-ary tree? eg, AST, CST, minimax, GP.




More information about the Python-list mailing list