any() and all() on empty list?

Paul Rubin http
Wed Mar 29 03:00:09 EST 2006


Ron Adam <rrr at ronadam.com> writes:
> In this view and empty set can be True for all().  Is it posible
> 'all([])'  is undefined?  Here, none() and all() return contradicting
> values.  So maybe the correct version may be...

I don't see any contradiction.  all([]) and none([]) are both true.

Anyway, this has all been discussed before in a slightly different context:

Harary, F. and Read, R. "Is the Null Graph a Pointless Concept?" In
Springer Lecture Notes in Math. 406 (1974) 37-44



More information about the Python-list mailing list