HowCanI: inlined exceptions

Thomas Wouters thomas at
Fri May 26 19:12:58 EDT 2000

On Fri, May 26, 2000 at 10:11:59PM +0000, Shae Erisson wrote:

> *false in Python is zero, empty string, empty list, empty tuple, or
> None, and anything else is true. (unless I'm missing something)

Empty dicts are false as well, and class-instances can define for themselves
wether they are true or false, by using a method called __nonzero__, I

Thomas Wouters <thomas at>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

More information about the Python-list mailing list