简体   繁体   English

Python 的默认实现在 CPython 中意味着什么?

[英]What does Default Implementation of Python means in CPython?

I have started learning python and there's a concept of flavors of python in which first is CPython and it's defination is that it is default implementation of Python.我已经开始学习 python,并且有一个 python 风格的概念,其中首先是 CPython,它的定义是它是 Python 的默认实现。 Now here i don't understand what it is trying to say, is that - full python is implemented in c language or is that only something is implemented of python in c language.现在在这里我不明白它想说什么,是-完整的python是用c语言实现的,还是只有python用c语言实现的东西。 Please figure out confusion among these.请找出其中的混淆。

There's one group of developers which work on the Python language.一组开发人员使用 Python 语言。 The "Python language" could just be an abstract specification of how the language is supposed to behave, with no actual runnable project. “Python 语言”可能只是该语言应该如何表现的抽象规范,没有实际的可运行项目。 But that's not what those Python developers do;但这不是那些 Python 开发人员所做的。 they produce the "Python language" both in the abstract as a series of suggestions and documentation , but they also implement that in the CPython language.他们以一系列建议文档的形式抽象地生成“Python 语言”,但他们也用CPython语言实现它。 CPython is an implementation of the Python language, written in C. "The Python language" in the abstract (specifications, documentation) and in its actual implementation in the form of CPython go hand in hand. CPython 是 Python 语言的一种实现,用 C 语言编写。“Python 语言”在抽象(规范、文档)中与其在 CPython 形式中的实际实现齐头并进。

There are other groups of developers implementing alternative versions of the Python language;还有其他开发人员团体实现了 Python 语言的替代版本。 they behave the same (for the most part) in that they can execute Python code conforming to the abstract language definition, but the Python implementation is not the aforementioned CPython, but something else.它们的行为(大部分)相同,因为它们可以执行符合抽象语言定义的 Python 代码,但 Python 实现不是前面提到的 CPython,而是其他东西。

CPython is the name of a particular implementation of the language Python, and with default they mean this is the one you most likely want to use. CPython 是 Python 语言的特定实现的名称,默认情况下,它们意味着这是您最可能想要使用的语言。 Other implementations include PyPy, Stackless and MicroPython.其他实现包括 PyPy、Stackless 和 MicroPython。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM