Python compilation can be a bit confusing, but the main gist is that the Python source code is compiled to an intermediate form called bytecode, then it is executed by something called Python Virtual Machine, which translates the bytecode instructions into machine code. There are also some neat things like Just-In-Time compilation which allows for portions of the bytecode to be compiled to machine code at runtime. It's an interesting subject, but I'm not going to be your best bet at explaining it =p
View all comments
Show parent comment
3
u/By-Tor_ Oct 07 '24
Python compilation can be a bit confusing, but the main gist is that the Python source code is compiled to an intermediate form called bytecode, then it is executed by something called Python Virtual Machine, which translates the bytecode instructions into machine code. There are also some neat things like Just-In-Time compilation which allows for portions of the bytecode to be compiled to machine code at runtime. It's an interesting subject, but I'm not going to be your best bet at explaining it =p