circuitpython/tests/basics/builtin_eval_error.py

7 lines
110 B
Python

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