Does the python interpreter convert all of the source code into byte code at runtime before executing the byte code using PVM? Or does the interpreter convert and execute at the same time?
Asked
Active
Viewed 51 times
0
-
2@AndrewLi nope, at least in CPython, the source is *compiled to bytecode first*, and then that bytecode is interpreted line-by-line – juanpa.arrivillaga Sep 05 '17 at 19:34
-
@juanpa.arrivillaga Really? I thought interpreted languages had their source interpreted by an interpreter. TIL. – Andrew Li Sep 05 '17 at 19:35
-
@AndrewLi modern languages are rarely purely interpreted or purely compiled. Rather, there is a mixture of both. See the discussion [here](https://softwareengineering.stackexchange.com/questions/24558/is-python-interpreted-or-compiled) – juanpa.arrivillaga Sep 05 '17 at 19:40
-
@juanpa.arrivillaga Thanks! – Andrew Li Sep 05 '17 at 20:10