Python Forum
Is python an interpreted language or a compiled language? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: Is python an interpreted language or a compiled language? (/thread-27826.html)



Is python an interpreted language or a compiled language? - GouravDas - Jun-23-2020

So im a newbie in python and i learnt that python is an interpreted language since pvm interprets the byte code , but the byte code is instead formed after compiling the python source file. So is python both compiled and interpreted language?


RE: Is python an interpreted language or a compiled language? - Gribouillis - Jun-23-2020

I would say yes because the python language is translated into another language, the bytecode, and translating one language into another is what a compiler does, but the bytecode is interpreted by a virtual machine, so python is also interpreted.

The confusion comes from the fact that the word 'compiler' has often be used as a synonym for a program that translates a language into machine code directly executable by a CPU. Obviously python is not compiled in this restrictive sense in the way that C is for example.