From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:59:47 +0000 (+0200) Subject: [3.14] gh-138011: Clarify tutorial method object example code (GH-138014) (#138025) X-Git-Tag: v3.14.0rc3~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e5ca3a411875b9557a1132720551f79d0ac8553;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-138011: Clarify tutorial method object example code (GH-138014) (#138025) Co-authored-by: Terry Jan Reedy --- diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 9d0fab8861d2..645acdf20fb5 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -359,7 +359,7 @@ Usually, a method is called right after it is bound:: x.f() -In the :class:`!MyClass` example, this will return the string ``'hello world'``. +If ``x = MyClass()``, as above, this will return the string ``'hello world'``. However, it is not necessary to call a method right away: ``x.f`` is a method object, and can be stored away and called at a later time. For example::