PCEP-30-02 · Question #123
What is CPython?
The correct answer is B. It's a default, reference implementation of the Python language, written in C. CPython is the default and reference implementation of the Python programming language, and it is written in C - making B correct. When you download Python from python.org and run a .py file, you're using CPython; it compiles your Python source to bytecode, then interprets that…
Question
Options
- AIt's a programming language that is a superset of the C language, designed to produce Python-like performance with code written in C.
- BIt's a default, reference implementation of the Python language, written in C.
- CIt's a programming language that is a superset of the Python, designed to produce C-like performance with code written in Python.
- DIt's a default, reference implementation of the C language, written in Python.
How the community answered
(37 responses)- A14% (5)
- B78% (29)
- C5% (2)
- D3% (1)
Explanation
CPython is the default and reference implementation of the Python programming language, and it is written in C - making B correct. When you download Python from python.org and run a .py file, you're using CPython; it compiles your Python source to bytecode, then interprets that bytecode via a C runtime.
Why the distractors fail:
- A inverts the relationship - CPython isn't a superset of C, nor does it produce "Python-like performance from C code."
- C describes something closer to Cython (a real but separate tool), which lets you write Python-like code that compiles to C extensions for speed - easy to confuse, but not CPython.
- D flips the languages entirely - no such thing as a "C reference implementation written in Python."
Memory tip: Break the word apart - CPython = the C-language implementation of Python. The leading language is the implementation language, the trailing language is what it runs.
Community Discussion
No community discussion yet for this question.