[Python-ideas] nonlocal functions
cmjohnson.mailinglist at gmail.com
Wed Oct 21 12:03:39 CEST 2009
> def foo():
> let a = 1
> let b = 3
> def bar():
> a = 2
> let b = 4
> return (a, b) # returns (2, 3)
This is all fantasy, but what is your proposal when this happens:
let a = 1
let a = 2 #Oops, forgot about already declaring it!
I also imagine that you won't allow a bare "let a"? Or does it just
set itself to None?
More information about the Python-ideas