Skip to content

Commit 9e5ca3a

Browse files
[3.14] pythongh-138011: Clarify tutorial method object example code (pythonGH-138014) (python#138025)
Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent cc38a57 commit 9e5ca3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/tutorial/classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ Usually, a method is called right after it is bound::
359359

360360
x.f()
361361

362-
In the :class:`!MyClass` example, this will return the string ``'hello world'``.
362+
If ``x = MyClass()``, as above, this will return the string ``'hello world'``.
363363
However, it is not necessary to call a method right away: ``x.f`` is a method
364364
object, and can be stored away and called at a later time. For example::
365365

0 commit comments

Comments
 (0)