Skip to content

Commit 1ecbe78

Browse files
[3.11] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) (#108357)
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 1aff195 commit 1ecbe78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Doc/library/dataclasses.rst

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

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

609609
Inheritance
610610
-----------

0 commit comments

Comments
 (0)