Hacker News new | ask | show | jobs
by Artemis2 4433 days ago
Python executes, it does not compiles.

EDIT: Whoops, it's actually compiled into bytecode then executed by the VM.

4 comments

it's generous to call the CPython interpreter a VM - the binary encoding of Python isn't some crazy IL bytecode, its' really just python-as-binary. Language constructs converted into opcodes, strings with pre-calculated hashes, and local variables within a scope become a sort of vector... but otherwise, it's a prettymuch 1:1 mapping between Python language constructs and the bytecode form.
This is not true.
It actually "compiles" into bytecode, then consumed by the interpreter.