circuitpython/tests/basics/builtin_eval_error.py

7 lines
112 B
Python
Raw Normal View History

# test if eval raises SyntaxError
try:
print(eval("[1, *a]"))
except SyntaxError:
print("SyntaxError")