bpo-33888: Use CPython instead of Python in the FAQ (GH-7767) · python/cpython@3a98ddd

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