4 ms·
I think the nonlocal keyword would make your second example work as you expect (but I can't test it as I don't have Python 3.0 installed here). See http://www.
by Cald 17y ago
I think the nonlocal keyword would make your second example work as you expect (but I can't test it as I don't have Python 3.0 installed here).
See http://www.python.org/dev/peps/pep-3104/ http://www.python.org/dev/peps/pep-3104/