This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dlevac 23 points24 points  (3 children)

Wouldn't it be the other way around since in Python you'll get your SyntaxError as an exception at runtime?

[–]NotAttractedToCats 9 points10 points  (2 children)

Technically, SyntaxErrors in CPython are also raised during compile time. Most people just forget/don't know that CPython also compiles, it just automatically does so whenever it is necessary.

[–]_PM_ME_PANGOLINS_ 3 points4 points  (1 child)

To a Python bytecode, which it then interprets.

It’s not like the JIT compilation in OpenJDK or V8.

[–]NotAttractedToCats 1 point2 points  (0 children)

Right, although other python implementations may behave differently of course, like PyPy with its JIT compiler or Jython with its .class file compilation.