Skip to content

Commit 79fdacc

Browse files
authored
gh-108267: Dataclasses docs: Fix object.__setattr__ typo (#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.
1 parent 64f9935 commit 79fdacc

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)