Created
August 2, 2012 12:31
-
-
Save alfredodeza/3236707 to your computer and use it in GitHub Desktop.
Unbound
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
FOO = None | |
def set_or_return(): | |
if FOO: | |
return FOO # local variable 'FOO' (defined in enclosing scope in line 1) referenced before assignment | |
try: | |
FOO = True | |
except: | |
FOO = False | |
return FOO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment