Non short-circuit variant of anyall

suggest change

reduce will not terminate the iteration before the iterable has been completly iterated over so it can be used to create a non short-circuit any() or all() function:

import operator
# non short-circuit "all"
reduce(operator.and_, [False, True, True, True]) # = False

# non short-circuit "any"
reduce(operator.or_, [True, False, False, False]) # = True

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents