Skip to content

Instantly share code, notes, and snippets.

@petrushev
Created August 15, 2013 09:14
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 petrushev/6239477 to your computer and use it in GitHub Desktop.
Save petrushev/6239477 to your computer and use it in GitHub Desktop.
Nested function scope gotcha
def echo_public():
def nested():
print public_
public_ = 5
nested()
echo_public()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment