3 ms·
Python does have closures, what it lacks is ability to modify enclosed variables without using annoying hacks. This will change in Python 3000 with the nonlocal
by dood 19y ago
Python does have closures, what it lacks is ability to modify enclosed variables without using annoying hacks. This will change in Python 3000 with the nonlocal keyword [http://www.python.org/dev/peps/pep-3104/ http://www.python.org/dev/peps/pep-3104/]. It may also be added to 2.6, but I'm not sure.