On Mon, 2007-07-09 at 07:02 -0700, Paul McGuire wrote:
> >>> any(map(lambda _ : _ is False,[3,2,1,0,-1]))
> False
> >>> any(map(lambda _ : _ is False,[3,2,1,0,-1,False]))
> True
> >>>

Why the map/lambda? Is it faster than the more readable generator
expression?

>>> any(x is False for x in [3,2,1,0,-1])
False
>>> any(x is False for x in [3,2,1,0,-1,False])
True

-- 
Carsten Haese
http://informixdb.sourceforge.net


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to