On Thursday, June 20, 2013 12:45:27 PM UTC+2, Antoon Pardon wrote:
> Op 19-06-13 18:14, russ.po...@gmail.com schreef:
> 
> >
> 
> >>>> all(map(lambda x: bool(x), xrange(10**9)))
> 
> 
> 
> Since you already have your answer, I just like to get your attention
> 
> to the fact the the lambda is superfluous here. Your expression
> 
> above is equivallent to
> 
> 
> 
>   all(map(bool, xrange(10**9)))

That's true, I didn't notice that. Although it was a trivial example I was 
setting up from the actual code and couldn't think of what to shove inside 
lambda so bool got the short straw.

The latest example I showed was actually.

>>> all(map(lambda x: n%x, xrange(2, n))) 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to