any() and all() on empty list?

Ron Adam rrr at ronadam.com
Fri Mar 31 01:30:46 EST 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.

Cheers,
    Ron



More information about the Python-list mailing list