On 1 Okt, 12:43, jhermann <[EMAIL PROTECTED]> wrote:
>
> f = [lambda n=n: n for n in range(10)]
> print f[0]()
> print f[1]()
>
> Note the "n=n", this prints 0 and 1 instead of 9/9.

Yes, Terry mentioned this in his response to my first message. Not
with lambdas, however, but he did state that he didn't believe that
such a distinction needed to be made clear to everyone.

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

Reply via email to