Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道这Python是独立于平台的,但我不明白它是如何工作的CPython。如果解释器和一些模块是用 编写的C,那么这些不是依赖于平台的吗?
Python
CPython
C
从某种意义上说,C 是平台独立的,因为它可以针对任何机器进行编译,编译器针对的是该机器。这就是 Python 源代码独立于平台的原因,即使 Python 二进制文件只能在一个平台上运行。