Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> a = 3
- >>> def foo():
- ... print a
- ... a = 4
- ...
- >>> foo()
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "<stdin>", line 2, in foo
- UnboundLocalError: local variable 'a' referenced before assignment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement