any() and all() on empty list?

Ron Adam rrr at
Fri Mar 31 08:30:46 CEST 2006

Carl Banks wrote:

> In Python, yes and no are the only possible answers.  Probably the only
> analogous thing you could do in Python would be for all() to raise
> ValueError when passed an empty sequence.

There is also 'None' which serves a similar purpose of indicating an 
invalid value when passing arguments.


More information about the Python-list mailing list