any() and all() on empty list?

vdrab stijndesaeger at gmail.com
Wed Mar 29 11:01:00 CEST 2006


> I'm completely on board with the semantics for any().  But all() bothers
> me.  If all() receives an empty list, it will return True, and I don't
> like that.  To me, all() should be a more restrictive function than any(),
> and it bothers me to see a case where any() returns False but all()
> returns True.

Who should we call to report this fallacy? GvR? Goedel? Tarski? no,
wait... Frege ! or wait... actually, I think that must be Aristotle.
Sorry Aristotle, the ol' syllogisms have to go.

; -)
All silliness aside, the meaning of all() in python corresponds just
fine with "all" in both language and logic.
s.




More information about the Python-list mailing list