Skip to content

Instantly share code, notes, and snippets.

View ultratude's full-sized avatar

Linjie Zhu ultratude

  • Columbia University
View GitHub Profile
import sys
def test1():
try:
raise Exception("tessssssssssssst")
except Exception as e:
def test2():
print(e)
return test2
test1()()
Traceback (most recent call last):
File "t.py", line 10, in <module>
test1()()
File "t.py", line 8, in test2
print(e)
NameError: free variable 'e' referenced before assignment in enclosing scope