[Chicago] falsy objects?

Ed Leafe ed at leafe.com
Fri Mar 19 15:57:40 CET 2010

On Mar 19, 2010, at 10:54 AM, Jonathan Hayward wrote:

> Is there such a method that can be defined, or is it non-negotiable that a user-defined class (which does not extend a class that can be falsy) will evaluate to true?

	Use the __nonzero__() method to determine how an object should evaluate for boolean comparisons.

-- Ed Leafe

More information about the Chicago mailing list