Home >Backend Development >Python Tutorial >Is python a compiled language?

Is python a compiled language?

silencement
silencementOriginal
2019-06-20 10:27:238360browse

Is python a compiled language?

Let me talk about the conclusion first. Python is an interpreted language.

What is compilation?

1. Generate the target file.
2. The target file is for a specific CPU system. The target file generated for ARM cannot be used for MIPS CPUs or x86 CPUs. The converse is also true.
That is to say, this code has been translated into target CPU instructions in the error of generating the target file, so if this program needs to be run on another CPU, this code must be re-translated.
The above translation process is called compilation.

What is an explanation?

For various non-compiled languages ​​​​(such as python/java), there may not be some fault of translation into intermediate files, there may be some process of compilation into intermediate files

If there are translation errors, then what they translate and generate is usually a kind of "platform-independent" intermediate code. This kind of code is generally not targeted at a specific CPU platform. They are It is translated into target CPU instructions during the running process, so it can be executed on ARM CPU, MIPS, and x86. There is no need to re-translate the source code.
Since these intermediate codes cannot be run directly on the CPU, some kind of intermediary (called a virtual machine) is required to translate the code into instructions that the CPU can execute during execution.

The above is the detailed content of Is python a compiled language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn