Gerhard Häring wrote:
len() make it clear
that the argument is a sequence.

Not necessarily. Classes that overrides __len__ may fool that assumption (well, in python classes that overrides special functions may do anything it is never intended to do).

I often think an "if item:" as "is item workable?". What the exact definition of "workable" is just something I don't care, at least until I need to debug the code. A container is workable if it contains something; most of the time, an empty sequence does not have any value (pun intended) and thus unworkable.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to