[Python-checkins] [3.11] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) (#108357)
AlexWaygood
webhook-mailer at python.org
Wed Aug 23 03:21:04 EDT 2023
https://github.com/python/cpython/commit/1ecbe787dde59b3d021990dbf92680f0301977ce
commit: 1ecbe787dde59b3d021990dbf92680f0301977ce
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-08-23T07:20:57Z
summary:
[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 79fdacc0059a3959074d2d9d054653eae1dcfe06)
Co-authored-by: FrozenBob <30644137+FrozenBob at users.noreply.github.com>
files:
M Doc/library/dataclasses.rst
diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index aa71e5e735f2c..09f4ce812dc83 100644
--- a/Doc/library/dataclasses.rst
+++ b/Doc/library/dataclasses.rst
@@ -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
-----------
More information about the Python-checkins
mailing list