Skip to content

[3.14] gh-137900: Improve dataclasses frozen parameter documentation (GH-137937) #137990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Doc/library/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading