Skip to content

bpo-33888: Use CPython instead of Python #7767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Doc/faq/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ you can always change a list's elements. Only immutable elements can be used as
dictionary keys, and hence only tuples and not lists can be used as keys.


How are lists implemented?
--------------------------
How are lists implemented in CPython?
-------------------------------------

Python's lists are really variable-length arrays, not Lisp-style linked lists.
CPython's lists are really variable-length arrays, not Lisp-style linked lists.
The implementation uses a contiguous array of references to other objects, and
keeps a pointer to this array and the array's length in a list head structure.

Expand All @@ -481,10 +481,10 @@ when the array must be grown, some extra space is allocated so the next few
times don't require an actual resize.


How are dictionaries implemented?
---------------------------------
How are dictionaries implemented in CPython?
--------------------------------------------

Python's dictionaries are implemented as resizable hash tables. Compared to
CPython's dictionaries are implemented as resizable hash tables. Compared to
B-trees, this gives better performance for lookup (the most common operation by
far) under most circumstances, and the implementation is simpler.

Expand Down