$ python test.py
File "test.py", line 2
x = 1 +
^
SyntaxError: invalid syntax
If syntax errors were runtime errors, we would see the effect of the print statement. This is not a top-level effect: the same is true even if a syntax error is under a function.