Chris DiBona comments on anti-virus software for mobile devices
plus.google.com1 pointsby narkee0 comments
i = 1
def f():
return i
i = 2
def g():
return i
Both f() and g() return 2, even though when f() is defined, shouldn't i=1 be closed over in this case? That's what I find confusing here, in the sense that the state of the environment changes outside the closure affect things inside the closure.