[Tutor] Thoughts on little lambda
Danny Yoo
dyoo@hkn.eecs.berkeley.edu
Mon, 11 Mar 2002 09:31:41 -0800 (PST)
On Mon, 11 Mar 2002 Doug.Shawhan@gecits.ge.com wrote:
> >>> from __future__ import nested_scopes
> >>> def addn(n):
> return lambda x:x+n
> SyntaxError: local name 'n' in 'addn' shadows use of 'n' as global in nested
> scope 'lambda' (<pyshell#3>, line 1)
> >>>
>
> Fiddlesticks. Off to d/l 2.2 :-)
Yikes:
http://mail.python.org/pipermail/python-list/2001-June/046708.html
http://mail.python.org/pipermail/python-list/2001-June/046712.html
and:
http://mail.python.org/pipermail/idle-dev/2002-January/000818.html
http://mail.python.org/pipermail/idle-dev/2002-January/000819.html
Python 2.2's IDLE should resolve the problem. Good luck!