]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141510: Mention frozendict in dict documentation (#144934)
authorVictor Stinner <vstinner@python.org>
Tue, 17 Feb 2026 22:03:22 +0000 (23:03 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Feb 2026 22:03:22 +0000 (23:03 +0100)
test_genericalias now tests also frozendict.

Doc/library/stdtypes.rst
Lib/pydoc_data/topics.py
Lib/test/test_genericalias.py

index 6f798f02e17899cf7384acfa3230fb080d47e4e6..a8f693f48790256aa0207bf8fc9a80ea3f644f97 100644 (file)
@@ -5590,8 +5590,8 @@ can be used interchangeably to index the same dictionary entry.
 
 
    .. seealso::
-      :class:`types.MappingProxyType` can be used to create a read-only view
-      of a :class:`dict`.
+      :class:`frozendict` and :class:`types.MappingProxyType` can be used to
+      create a read-only view of a :class:`dict`.
 
 .. _thread-safety-dict:
 
index 32cf9a995bae3d4d9b2475cfb7412bc98df24715..dc09c5fd47affee42b5dcdb802b1c230bb277e79 100644 (file)
@@ -3676,8 +3676,8 @@ less likely to be able to resolve annotations at runtime.
 
     * a class that inherits from any of the above
 
-    The standard library classes "dict" and "types.MappingProxyType"
-    are mappings.
+    The standard library classes "dict", "frozendict"
+    and "types.MappingProxyType" are mappings.
 
 [4] A string literal appearing as the first statement in the function
     body is transformed into the function’s "__doc__" attribute and
@@ -13620,8 +13620,8 @@ class dict(iterable, /, **kwargs)
 
 See also:
 
-  "types.MappingProxyType" can be used to create a read-only view of a
-  "dict".
+  "frozendict" and "types.MappingProxyType" can be used to create a read-only
+  view of a "dict".
 
 
 Dictionary view objects
index 2b9cee6433b5b8c6282d32b4c591ae0e75e9ca0e..a5969b7a47d948b0b70fc73cd960f369cc3c5aed 100644 (file)
@@ -101,7 +101,8 @@ _UNPACKED_TUPLES = [
 
 class BaseTest(unittest.TestCase):
     """Test basics."""
-    generic_types = [type, tuple, list, dict, set, frozenset, enumerate, memoryview,
+    generic_types = [type, tuple, list, dict, frozendict,
+                     set, frozenset, enumerate, memoryview,
                      slice,
                      defaultdict, deque,
                      SequenceMatcher,