Is python a compiled language?

silencement
Release: 2019-06-20 10:27:23
Original
8301 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!