Avatar ·

Analysis of Python operation mechanisms

📁 Advanced Python Topics, question, AI

Not so long ago I have been using Python for my purposes. A question arose regarding the implementation of the language itself. I'll start in order:

  1. The Python language, as far as I understand, is written in C. But then what does Cython mean? Is it the same thing?
  2. If it is written in C, how is it interpreted? I have an assumption that each line is compiled separately and immediately executed, is that correct? Can I read the sources somewhere?
  3. On the Internet, there is information about the Python virtual machine. What is it? I know that Java has one. But Java is not an interpreted language. After compilation, it produces bytecode, which is then interpreted on the fly by the JRE for a specific machine. But there is no equivalent of JRE... or is there?