2 ms·
> Using min(∅) = +inf and max(∅) = -inf would violate the otherwise valid constraint that min(x) ≤ max(x). I'd be a little uncomfortable with it for that reason
by eru 7y ago
> Using min(∅) = +inf and max(∅) = -inf would violate the otherwise valid constraint that min(x) ≤ max(x). I'd be a little uncomfortable with it for that reason.
Excellent point!
Funny enough, we have the same with 'any' and 'all':
For most lists of booleans: all(l) ≤ any(l). Or equivalently all(l) implies any(l).
But that property is broken for empty lists.
Hmm, I think I might understand the case for `all([]) == False` a bit better now. Though I still disagree with it.