Visitar URL original
gh-108267: Fix object.__setattr__ regression in dataclasses docs (#11… · estyxx/cpython@4926303 · GitHub
Skip to content

Commit 4926303

Browse files
hauntsaninjaestyxx
authored andcommitted
pythongh-108267: Fix object.__setattr__ regression in dataclasses docs (python#119082)
1 parent 74a5a66 commit 4926303

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Doc/library/dataclasses.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,8 @@ methods will raise a :exc:`FrozenInstanceError` when invoked.
615615

616616
There is a tiny performance penalty when using ``frozen=True``:
617617
:meth:`~object.__init__` cannot use simple assignment to initialize fields, and
618-
must use :meth:`!__setattr__`.
618+
must use :meth:`!object.__setattr__`.
619+
.. Make sure to not remove "object" from "object.__setattr__" in the above markup
619620
620621
.. _dataclasses-inheritance:
621622

0 commit comments

Comments
 (0)