Boolean tests [was Re: Attack a sacred Python Cow]

Matthew Fitzgibbons elessar at nienna.org
Fri Aug 1 08:52:56 EDT 2008


Matthew Fitzgibbons wrote:
> 'if x' strikes me as better for this case because you might want to 
> accept a non-empty list (or some other objects) but reject non-empty 
> lists. 'if x is None' would not work. It still may be susceptible to the 
> empty iterator problem, depending on what prep_func does.

I mean reject empty lists. I need to be slower on hitting send.

-Matt



More information about the Python-list mailing list