[Python-Dev] product()

Michael Chermside mcherm at mcherm.com
Tue Oct 28 10:44:38 EST 2003


Nick Coghlan writes:

>  >>> if all(pred(x) for x in values): pass       # alltrue
>  >>> if any(pred(x) for x in values): pass       # anytrue
>  >>> if any(not pred(x) for x in values): pass   # anyfalse
>  >>> if all(not pred(x) for x in values): pass   # allfalse
> 
> The names from the earlier thread do read nicely. . .

+1  Very nicely indeed.

-- Michael Chermside



More information about the Python-Dev mailing list