Created
July 25, 2012 13:53
-
-
Save bergerx/3176300 to your computer and use it in GitHub Desktop.
reply to gist: 3176161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_counter(): | |
scope={'i':0} | |
def increment(): | |
scope['i'] +=1 | |
print scope['i'] | |
return increment | |
count = create_counter() | |
count() | |
count() | |
count() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment