Last active
August 29, 2015 13:57
-
-
Save weissjeffm/9837160 to your computer and use it in GitHub Desktop.
huh.py
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
x=1 | |
def foo(y): | |
x += 1 | |
return x + y | |
foo(2) | |
Truncated Traceback (Use C-c C-x to view full TB): | |
<ipython-input-24-807bbe2ba12a> in foo(y) | |
1 x=1 | |
2 def foo(y): | |
----> 3 x += 1 | |
4 return x + y | |
5 foo(2) | |
UnboundLocalError: local variable 'x' referenced before assignment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment