Based on what I've seen on other stackoverflow pages:
- Does all(list) use short circuit evaluation?
- Do all() and any() always short-circuit in order?
- Is the shortcircuit behaviour of Python's any/all explicit?
the following code should short circuit:
any(True, 2+2, False, 2/0)
all(True, 2+2, False, 2/0)
any([True, 2+2, False, 2/0])
all([True, 2+2, False, 2/0])
but for every one of them I get a ZeroDivisionError: division by zero.
Am I missing something? Why does it error?