News for hackers. Stuff that matters.
Re:The 2,500 year old history of why Python’s all([]) return... by dragonwriter on Friday August 25, 2023 @08:02PM (#37268550)
Its necessary that all and none are both true of empty lists, if they are both defined for empty lists, because otherwise the invariant that all(xs) == none(not x for x in xs) [0] would not hold.

[0] yes, “none()” doesn’t actually exist in Python, but we can imagine that it did, and see that if it did, it should have this relationship.)

There are no comments on this comment yet.