Also, I thought that part of the python philosophy was to allow any
sort of object in a list, and to allow the same methods to work with
whatever was in list.

Not really. When the usual argument about the existence (and justification) of lists & tuples comes along, one common distinction is that

- tuples contain arbitrary object of varying types, so they are kind of "records"
 - lists should contain uniform objects.

None of this is enforced, but it's good customs to do so & to put it frankly: if I came along a piece of code that created a list like the one you presented, I'd say it's a code-smell.

Diez
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to