Skip to content

Instantly share code, notes, and snippets.

@corruptmem
Created November 20, 2010 00:09
Show Gist options
  • Save corruptmem/707455 to your computer and use it in GitHub Desktop.
Save corruptmem/707455 to your computer and use it in GitHub Desktop.
funcs = []
def f():
for i in xrange(5):
def g(): return i
funcs.append(g)
f()
for f in funcs:
print(f())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment