any() and all() on empty list?

Paul Rubin http
Wed Mar 29 06:35:19 EST 2006


Steven D'Aprano <steve at REMOVETHIScyber.com.au> writes:
> While the implemented behaviour might be more practical than the
> alternatives, it is still worrying paradoxical. If "All sheep are woolly",
> then obviously it must also be true that "Any sheep is woolly". More
> formally, if all(X), then any(X) -- except for the case of empty X. Hmmm.

Maybe "any" should be renamed to "some".



More information about the Python-list mailing list