Typically, when you work with Python code, there is no compilation step, so I would say that all errors in Python, including SyntaxErrors, are runtime errors.
For example, let's write this file:
in xrange(5):
This is obviously just absurd (we will call it nonsense.py), but it allows you to run the interpreter:
$ python >>> try: ... import nonsense ... except SyntaxError: ... print("A syntax error occurred at runtime!") ... A syntax error occurred at runtime! >>>
So, you have it - SyntaxError was raised and caught at runtime, which, in my opinion, at least indicates that this is a runtime error.
Artoffarfare
source share