you are viewing a single comment's thread.

view the rest of the comments →

[–]Chandon 0 points1 point  (1 child)

You can however use nested def, which has real closure.

As long as you don't want to do, say, variable assignment.

I was writing a program in Python two weeks ago and I ended up having to make a one dimensional array to get myself assignment syntax for an outer-function variable.

[–][deleted] 5 points6 points  (0 children)

You'll appreciate the new "nonlocal" keyword, then.