Chris Angelico <>:

>>> > You're right, except that Python is never compiled, it was just
>>> > checked for syntax error before interpreting code.
>>> It's compiled.
>> Using this function, the code is "compiled".
>> I do not think this function is often used and most python project
>> simply use the interpreter (which do a small translation into
>> byte-code to be faster and check syntax error before running
>> interpretation).
> When you import, the same form of compilation is done. It always
> happens. Python does not execute your raw source code - it'd be too
> inefficient.

There's no clear line between compilation and interpretation. You have
the source code and the execution semantics. All kinds of opportune
transformations can take place before the execution, after the
execution, during the execution etc as long as the correct semantics are


Reply via email to