From fb08e9a1769347f1c37f095552eb77e5b0951153 Mon Sep 17 00:00:00 2001 From: Ihor Date: Mon, 9 Mar 2026 10:53:37 +0200 Subject: [PATCH 1/2] docs: improve readability of 9.3.3 and 9.3.4 paragraphs --- Doc/tutorial/classes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 4f7da5253f78bc..10dd5c3c804bb5 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -326,7 +326,7 @@ instance objects are attribute references. There are two kinds of valid attribute names: data attributes and methods. *Data attributes* correspond to "instance variables" in Smalltalk, and to "data -members" in C++. Data attributes need not be declared; like local variables, +members" in C++. Data attributes don't have to be declared like local variables, they spring into existence when they are first assigned to. For example, if ``x`` is the instance of :class:`!MyClass` created above, the following piece of code will print the value ``16``, without leaving a trace:: @@ -367,7 +367,7 @@ object, and can be stored away and called at a later time. For example:: while True: print(xf()) -will continue to print ``hello world`` until the end of time. +will continue to print ``hello world`` until the end of time or when ``Ctrl + C`` is pressed. What exactly happens when a method is called? You may have noticed that ``x.f()`` was called without an argument above, even though the function From 46b0be414a5c474e0d933eb03f9355602cf718c1 Mon Sep 17 00:00:00 2001 From: Ihor Date: Mon, 9 Mar 2026 19:08:13 +0200 Subject: [PATCH 2/2] docs: correct the sentence on method objects --- Doc/tutorial/classes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 10dd5c3c804bb5..7be376f6c196ee 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -367,7 +367,7 @@ object, and can be stored away and called at a later time. For example:: while True: print(xf()) -will continue to print ``hello world`` until the end of time or when ``Ctrl + C`` is pressed. +will continue to print ``hello world`` until the end of time. What exactly happens when a method is called? You may have noticed that ``x.f()`` was called without an argument above, even though the function