Agree. What we probably need is a nice way to switch between deployment/development setups, possibly by splitting settings.py like rails
2 karma · joined October 28, 2007
def foo (n)
lambda {|i| n += i }
endn=5
a = foo(n)
puts a.call(3) #prints 8
puts n # still prints 5. n is not incremented
I agree that the python one is strictly not according to the problem definition, but for all practical purposes both python equivalents are the same, aren't they? or am I missing something?
def foo(n):
return lambda i:n+i
Tried it (Python 2.5) and it works.