Implicit conversion to boolean in if and while statements

Devin Jeanpierre jeanpierreda at gmail.com
Tue Jul 17 11:38:07 CEST 2012


On Tue, Jul 17, 2012 at 2:25 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> It already is part of the collection interface: it is spelled __nonzero__
> (Python 2) or __bool__ (Python 3), and like all dunder methods, it is
> called automatically for you when you use the right syntax:

You're still ignoring what I actually said.

-- Devin



More information about the Python-list mailing list