Skip to content

Commit 3aa7df6

Browse files
[3.12] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) (#108358)
gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) Fixed a sentence in dataclasses.rst Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general. (cherry picked from commit 79fdacc) Co-authored-by: FrozenBob <[email protected]>
1 parent 0d6e657 commit 3aa7df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/dataclasses.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ methods will raise a :exc:`FrozenInstanceError` when invoked.
609609

610610
There is a tiny performance penalty when using ``frozen=True``:
611611
:meth:`~object.__init__` cannot use simple assignment to initialize fields, and
612-
must use :meth:`~object.__setattr__`.
612+
must use :meth:`!object.__setattr__`.
613613

614614
Inheritance
615615
-----------

0 commit comments

Comments
 (0)