Boolean tests [was Re: Attack a sacred Python Cow]

Carl Banks pavlovevidence at gmail.com
Thu Jul 31 03:10:08 CEST 2008


On Jul 30, 11:07 am, Terry Reedy <tjre... at udel.edu> wrote:
> Carl Banks wrote:
> > That's not what I was asking for.  I was asking for a use case for "if
> > x" that can't be replaced by a simple explicit test.  Your example
> > didn't satisfy that.
>
> But I believe my example of an iterator with __bool__ but not with
> __len__ does.

And I believe I followed up to your post saying as much. :)


Carl Banks



More information about the Python-list mailing list