[Python-ideas] Break the dominance of boolean values in boolean context

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Sep 15 01:15:05 CEST 2011

Steven D'Aprano wrote:

> I don't see that. next() returns the next item from an iterator 
> regardless of its boolean state. The actual and proposed implementations 
> of any() skip over false items.

While such a function might be useful, I think it would be
better provided as a new function called something like
first(), rather than changing any().


More information about the Python-ideas mailing list