From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 11 Jul 2023 17:40:17 +0000 (-0700) Subject: [3.11] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106637) X-Git-Tag: v3.11.5~212 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=549b528abeb7a8594967c367ce8ac5e79f96949c;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106637) (cherry picked from commit d0b7e18262e69dd4b8252e804e4f98fc9533bcd6) Co-authored-by: RustyNail Co-authored-by: Terry Jan Reedy --- diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index c9b3d982c31c..4336bf50df40 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -307,8 +307,9 @@ you can use the class name followed by an argument list resembling a constructor, but with the ability to capture attributes into variables:: class Point: - x: int - y: int + def __init__(self, x, y): + self.x = x + self.y = y def where_is(point): match point: