summaryrefslogtreecommitdiffstats
path: root/Doc/faq
diff options
context:
space:
mode:
authorAndrés Delfino <adelfino@gmail.com>2018-07-07 23:25:47 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2018-07-07 23:25:47 (GMT)
commit8d41278045ee4e8bf1cadb58a7db58d70ad55237 (patch)
tree5a1a4992a73cd31032fd0828eadbb5abd7123488 /Doc/faq
parent9c5ba097485c8c643b670acd4026f4382bc92f4b (diff)
downloadcpython-8d41278045ee4e8bf1cadb58a7db58d70ad55237.zip
cpython-8d41278045ee4e8bf1cadb58a7db58d70ad55237.tar.gz
cpython-8d41278045ee4e8bf1cadb58a7db58d70ad55237.tar.bz2
bpo-33888: Use CPython instead of Python in the FAQ (GH-7767)
Make the change where discussing the CPython implementation of lists and dicts.
Diffstat (limited to 'Doc/faq')
-rw-r--r--Doc/faq/design.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst
index 5168121..10fa490 100644
--- a/Doc/faq/design.rst
+++ b/Doc/faq/design.rst
@@ -470,10 +470,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.
@@ -486,10 +486,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.