Python code is compiled before execution

BartC bc at freeuk.com
Tue Oct 11 09:19:08 EDT 2016


On 11/10/2016 13:35, Pierre-Alain Dorange wrote:
> Ben Finney <ben+python at benfinney.id.au> wrote:
>
>> The "small translation into byte-code" *is* compilation.
>>
>> Don't make the mistake that the only product of "compile" is some CPU
>> code; that is a foolishly narrow definition.
>
> OK right.
> For my part, i differenciate a strict compilation (ie. C) from a
> translation into byte-code (ie. Python). From design there was
> differences as Python was an interpreted language, not a compiled (AOT).
> But as there was only one word, let do with it ;-)
>
> Of course in real language world there was many situation and all kind
> of combinaison : strict interpretation, byte-code compilation, JIT
> compilation, AOT compilation...
>
> So yes Python compile (bytecode).

I use 'byte-code compiler' and 'native-code compiler' when the 
distinction is important.

Python is not really suited for AOT native-code compilation. Here I 
might just say CPython if I'm assuming a normal byte-code compiler and 
byte-code interpreter model.

-- 
bartc



More information about the Python-list mailing list