gh-108267: Fix object.__setattr__ regression in dataclasses docs (#119082)

This commit is contained in:
Shantanu 2024-05-16 06:39:37 -07:00 committed by GitHub
parent b6839942a8
commit 17cba55786
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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: