Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
qwertyuiop924
· 10y ago · 0 comments
It's not as bad as I thought, but Python doesn't actually have lexical scope, not really. But the LEGB rules mean that it should still work as you expect.
Comments
[–]
TJSomething
10y ago
It does if you're using Python 3, which has the nonlocal keyword for lexical scope.
[–]
qwertyuiop924
OP
10y ago
Finally. But that should really be default.