From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 23 Aug 2023 07:20:57 +0000 (-0700) Subject: [3.11] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) (#108357) X-Git-Tag: v3.11.5~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ecbe787dde59b3d021990dbf92680f0301977ce;p=thirdparty%2FPython%2Fcpython.git [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@users.noreply.github.com> --- diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index aa71e5e735f2..09f4ce812dc8 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 -----------