In <mailman.1069.1269283393.23598.python-l...@python.org> Tim Golden <m...@timgolden.me.uk> writes:
>On 22/03/2010 18:30, kj wrote: >> Thanks! I'm glad to know that one can get the short circuiting >> using a map-type idiom. (I prefer map over comprehensions when I >> don't need to define a function just for the purpose of passing it >> to it.) >In what way does "map" over "comprehensions" save you defining a function? >any (map (is_invalid, L)) >any (is_invalid (i) for i in L) I was talking in the *general* case. map at the very least requires a lambda expression, which is a one-time function defintion. ~K -- http://mail.python.org/mailman/listinfo/python-list