[Chicago] falsy objects?

Jonathan Hayward christos.jonathan.hayward at gmail.com
Mon Mar 22 21:42:45 CET 2010


Thanks, @all.

On Fri, Mar 19, 2010 at 10:07 AM, Ken Schutte <kenschutte at gmail.com> wrote:

> As others said, "__nonzero__" will do it.  The relevant docs are here:
> http://docs.python.org/library/stdtypes.html#truth-value-testing
>
> Ken
>
>
> On Fri, Mar 19, 2010 at 10:04 AM, Brian Ray <bray at sent.com> wrote:
> > You probably want to look at truth operator overloading
> > http://docs.python.org/library/operator.html
> >
> > On a side note, you may also want to look into Mock object helpers
> > http://python-mock.sourceforge.net/ depending on what your trying to do.
> > They are useful on several levels, but the mock library itself needs to
> do
> > things like truth testing.
> >
> > Brian Ray
> >
> >
> >
> > _______________________________________________
> > Chicago mailing list
> > Chicago at python.org
> > http://mail.python.org/mailman/listinfo/chicago
> >
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>



-- 
→ Jonathan Hayward, christos.jonathan.hayward at gmail.com
→ An Orthodox Christian author: theology, literature, et cetera.
→ My award-winning collection is available for free reading online:
☩ I invite you to visit my main site at http://JonathansCorner.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20100322/d72893a9/attachment-0001.html>


More information about the Chicago mailing list