Skip to content
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
gh-108267: Fix object.__setattr__ regression in dataclasses docs (GH-…
…119082)

(cherry picked from commit 17cba55)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
  • Loading branch information
hauntsaninja authored and miss-islington committed May 16, 2024
commit 5d11c07b658342f72736934580f466feb6f2b66e
3 changes: 2 additions & 1 deletion Doc/library/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ methods will raise a :exc:`FrozenInstanceError` when invoked.

There is a tiny performance penalty when using ``frozen=True``:
:meth:`~object.__init__` cannot use simple assignment to initialize fields, and
must use :meth:`!__setattr__`.
must use :meth:`!object.__setattr__`.
.. Make sure to not remove "object" from "object.__setattr__" in the above markup

.. _dataclasses-inheritance:

Expand Down