Alex Martelli wrote: > if len(somecontainer) > 0: > > instead of the obvious > > if somecontainer: > > so it's not as if pythonistas in general are blessed with some magical > "redundancy avoidance spell"... That is not always equivalent:
>>> z = Numeric.zeros(5) >>> z array([0, 0, 0, 0, 0]) >>> bool(z) False >>> len(z) > 0 True Peter -- http://mail.python.org/mailman/listinfo/python-list