Created
December 30, 2011 08:40
-
-
Save digicyc/1538793 to your computer and use it in GitHub Desktop.
Python Scope
This file contains hidden or 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
#!/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