From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:57:30 +0000 (-0700) Subject: [3.11] gh-101100: Fix sphinx warnings in `tutorial/classes.rst` (GH-108746) (#108755) X-Git-Tag: v3.11.6~160 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b143468995ca9e6e1ecfa69b5dc8fd587fcc33a;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-101100: Fix sphinx warnings in `tutorial/classes.rst` (GH-108746) (#108755) Co-authored-by: Nikita Sobolev --- diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 871a48282523..ab7f4a8dc618 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -158,7 +158,6 @@ Doc/reference/expressions.rst Doc/reference/import.rst Doc/reference/simple_stmts.rst Doc/tutorial/appendix.rst -Doc/tutorial/classes.rst Doc/tutorial/controlflow.rst Doc/tutorial/datastructures.rst Doc/tutorial/introduction.rst diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index e4002cfa3519..46dfb378590f 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -276,7 +276,7 @@ definition looked like this:: then ``MyClass.i`` and ``MyClass.f`` are valid attribute references, returning an integer and a function object, respectively. Class attributes can also be assigned to, so you can change the value of ``MyClass.i`` by assignment. -:attr:`__doc__` is also a valid attribute, returning the docstring belonging to +:attr:`!__doc__` is also a valid attribute, returning the docstring belonging to the class: ``"A simple example class"``. Class *instantiation* uses function notation. Just pretend that the class