Skip to content

Instantly share code, notes, and snippets.

@digicyc
Created December 30, 2011 08:40
Show Gist options
  • Save digicyc/1538793 to your computer and use it in GitHub Desktop.
Save digicyc/1538793 to your computer and use it in GitHub Desktop.
Python Scope
#!/usr/bin/env python
if True:
myval = "True"
else:
myval = "False"
# The Control statements appear to NOT have any strict scope.
print myval # This will infact print "True" o_O
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment