Skip to content

Instantly share code, notes, and snippets.

@ErinCall
Created December 7, 2011 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ErinCall/1444091 to your computer and use it in GitHub Desktop.
Save ErinCall/1444091 to your computer and use it in GitHub Desktop.
I can't believe this is legal python. Not only does it compile it runs without exception
>>> def doathing():
... def printathing():
... print a
...
... for a in [ 'a', 'b']:
... printathing()
...
>>> doathing()
a
b
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment