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