[Twisted-Python] __nonzero__ for Deferred

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Mar 18 16:03:14 MDT 2015


I'd like to deprecate and remove __nonzero__ on Deferreds.  Occasionally I see code where someone (maybe even me) does "if d:" where they should have been doing "@d.addCallback def cb(result): if result: ...".

Anybody else have this issue?  Objections?

-glyph




More information about the Twisted-Python mailing list