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

Carl Banks pavlovevidence at gmail.com
Wed Jul 30 21:10:08 EDT 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