On Fri, 14 Jun 2013 16:49:11 +0000, Steven D'Aprano wrote: > Unlike Javascript though, Python's idea of truthy and falsey is actually > quite consistent:
Beyond that, if a user-defined type implements a __nonzero__() method then it determines whether an instance is true or false. If it implements a __len__() method, then an instance is true if it has a non-zero length. -- http://mail.python.org/mailman/listinfo/python-list