From: Victor Stinner Date: Tue, 17 Feb 2026 22:03:22 +0000 (+0100) Subject: gh-141510: Mention frozendict in dict documentation (#144934) X-Git-Tag: v3.15.0a7~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e779777c66595acc599162fc3c852f3cda3f5c45;p=thirdparty%2FPython%2Fcpython.git gh-141510: Mention frozendict in dict documentation (#144934) test_genericalias now tests also frozendict. --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 6f798f02e178..a8f693f48790 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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: diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py index 32cf9a995bae..dc09c5fd47af 100644 --- a/Lib/pydoc_data/topics.py +++ b/Lib/pydoc_data/topics.py @@ -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 diff --git a/Lib/test/test_genericalias.py b/Lib/test/test_genericalias.py index 2b9cee6433b5..a5969b7a47d9 100644 --- a/Lib/test/test_genericalias.py +++ b/Lib/test/test_genericalias.py @@ -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,