Skip to content

Commit 3a98ddd

Browse files
bpo-33888: Use CPython instead of Python in the FAQ (GH-7767)
Make the change where discussing the CPython implementation of lists and dicts. (cherry picked from commit 8d41278) Co-authored-by: Andrés Delfino <[email protected]>
1 parent 3707dfa commit 3a98ddd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Doc/faq/design.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,10 @@ you can always change a list's elements. Only immutable elements can be used as
503503
dictionary keys, and hence only tuples and not lists can be used as keys.
504504

505505

506-
How are lists implemented?
507-
--------------------------
506+
How are lists implemented in CPython?
507+
-------------------------------------
508508

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

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

521521

522-
How are dictionaries implemented?
523-
---------------------------------
522+
How are dictionaries implemented in CPython?
523+
--------------------------------------------
524524

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

0 commit comments

Comments
 (0)