Created
March 7, 2013 12:20
-
-
Save farces/5107667 to your computer and use it in GitHub Desktop.
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
mydict = {} | |
mydict['penis'] = "boner" | |
def thing_one(): | |
for k,v in mydict.items(): | |
print "%s %s" % (k,v) | |
def thing_two(): | |
for k,v in mydict.items(): | |
print "%s %s" % (k,v) | |
mydict = {} | |
>>> thing_one() | |
penis boner | |
>>> thing_two() | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "<stdin>", line 2, in thing_two | |
UnboundLocalError: local variable 'mydict' referenced before assignment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment