Thanks for pointing that out. I would have guessed that the original form would desugar to
map(lambda i: (lambda: i), xrange(10))
but apparently it doesn't. map(lambda i: (lambda: i), xrange(10))
but apparently it doesn't.I believe it doesn't desugar to a map+lambda for performance reasons.