https://github.com/python/cpython/commit/5923849855b784c3f098e475047ff982d2faa135 commit: 5923849855b784c3f098e475047ff982d2faa135 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2025-08-20T16:49:43+03:00 summary:
[3.14] gh-137900: Improve dataclasses frozen parameter documentation (GH-137937) (#137990) gh-137900: Improve dataclasses frozen parameter documentation (GH-137937) (cherry picked from commit 7685b8ada84822a7ee9ce51e8ee0e2e35fd60b4e) Co-authored-by: Tangyuan <[email protected]> files: M Doc/library/dataclasses.rst diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index 299c8aa399c25c..2e4520c823bf3e 100644 --- a/Doc/library/dataclasses.rst +++ b/Doc/library/dataclasses.rst @@ -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 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
