News for hackers. Stuff that matters.
Re:The 2,500 year old history of why Python’s all([]) return... by imtringued on Wednesday March 18, 2020 @08:27AM (#22615815)
It's pretty obvious from any standpoint.

all([True, True] + []) is equivalent to `True and True and ?`. If you replace ? with False then all() will never return True in any case because given any list you can always create an equivalent list by appending [] which would taint the list to always return False on all(). Obviously nobody wants all() to return False on a valid list and the concept of tainting a list is pretty stupid so True is the only option. If you replace ? with True you can add as many empty lists as you like which is the desired behavior.

all([True, True] + [] + [] + []) == True and True and True and True and True

Re:The 2,500 year old history of why Python’s all([]) return... by gridlockd on Wednesday March 18, 2020 @09:15AM (#22616251)
> It's pretty obvious from any standpoint.

If it was obvious from any standpoint, we obviously wouldn't be having this blog post or this discussion thread.

Natural language - the natural way to think about things - does not always intuitively translate over to predicate logic. If you disagree with that, you should try teaching it to a class of high schoolers.

Re:The 2,500 year old history of why Python’s all([]) return... by earthboundkid on Wednesday March 18, 2020 @10:20PM (#22623759)
Lol, I used to believe that logic was an intrinsic faculty of human reason, and then I taught a bunch of freshmen.