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

Mike Graham mikegraham at gmail.com
Wed Sep 14 15:18:07 CEST 2011

On Wed, Sep 14, 2011 at 9:12 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
> Perhaps 'need' is putting it too strongly, but if any()/all() were changed
> to return the first true-ish/last false-ish value, then the extra parameter
> would be convenient in specifying the value desired if it wasn't True/False.
>  Sort of like {}.get('nothere', '5').
> ~Ethan~

It's worth noting that this implementation of any would make it
suspiciously similar to next.

More information about the Python-ideas mailing list