]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-137900: Improve dataclasses frozen parameter documentation (GH-137937)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 20 Aug 2025 13:15:39 +0000 (15:15 +0200)
committerGitHub <noreply@github.com>
Wed, 20 Aug 2025 13:15:39 +0000 (13:15 +0000)
gh-137900: Improve dataclasses frozen parameter documentation (GH-137937)
(cherry picked from commit 7685b8ada84822a7ee9ce51e8ee0e2e35fd60b4e)

Co-authored-by: Tangyuan <47830915@qq.com>
Doc/library/dataclasses.rst

index 432c2b0d7bc000ddeea1b42e52fce3880db1f892..ae474a1f46c29ebced20bd417f7238f9b94d810e 100644 (file)
@@ -161,9 +161,11 @@ Module contents
      :class:`object`, this means it will fall back to id-based hashing).
 
    - *frozen*: If true (the default is ``False``), assigning to fields will
-     generate an exception.  This emulates read-only frozen instances.  If
-     :meth:`~object.__setattr__` or :meth:`~object.__delattr__` is defined in the class, then
-     :exc:`TypeError` is raised.  See the discussion below.
+     generate an exception.  This emulates read-only frozen instances.
+     See the :ref:`discussion <dataclasses-frozen>` below.
+
+     If :meth:`~object.__setattr__` or :meth:`~object.__delattr__` is defined in the class
+     and *frozen* is true, then :exc:`TypeError` is raised.
 
    - *match_args*: If true (the default is ``True``), the
      :attr:`~object.__match_args__` tuple will be created from the list of