Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <30644137+FrozenBob@users.noreply.github.com>
  • Loading branch information
FrozenBob authored and miss-islington committed Aug 23, 2023
commit dc39f83e675fa6bc645740c8c9ad91d4a918a371
2 changes: 1 addition & 1 deletion Doc/library/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ 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:`~object.__setattr__`.
must use :meth:`!object.__setattr__`.

Inheritance
-----------
Expand Down