Scoping Issues
SherjilOzair
sherjilozair at gmail.com
Thu May 24 21:23:18 EDT 2012
More information about the Python-list mailing list
Thu May 24 21:23:18 EDT 2012
- Previous message (by thread): Help doing it the "python way"
- Next message (by thread): Scoping Issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
def adder(): s = 0 def a(x): s += x return sum return a pos, neg = adder(), adder() for i in range(10): print pos(i), neg(-2*i) This should work, right? Why does it not? Checkout slide no. 37 of a Tour of Go to know inspiration. Just wanted to see if python was the same as Go in this regard. Sorry, if I'm being rude, or anything.
- Previous message (by thread): Help doing it the "python way"
- Next message (by thread): Scoping Issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list