circuitpython/tests/basics/try_as_var.py

11 lines
188 B
Python

try:
raise ValueError(534)
except ValueError as e:
print(type(e), e.args)
# Var bound in except block is automatically deleted
try:
e
except NameError:
print("NameError")