mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 04:30:24 +01:00
py: Make compiler return a proper exception on SyntaxError.
This commit is contained in:
6
tests/basics/builtin_eval_error.py
Normal file
6
tests/basics/builtin_eval_error.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# test if eval raises SyntaxError
|
||||
|
||||
try:
|
||||
print(eval("[1, *a]"))
|
||||
except SyntaxError:
|
||||
print("SyntaxError")
|
||||
Reference in New Issue
Block a user