4 ms·
That should read: def foo(n): n = [n] def bar(i): n[0] += i return n[0] return bar Python really needs a s
by testapplication 19y ago
That should read:
def foo(n):
n = [n]
def bar(i):
n[0] += i
return n[0]
return bar
Python really needs a scoping syntax to allow assignment to closed variables.