micropython/tests/basics/try_as_var.py

11 lines
180 B
Python

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