summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-07-11 17:40:59 (GMT)
committerGitHub <noreply@github.com>2023-07-11 17:40:59 (GMT)
commit139e7ac7c2a798820554abb6c84b9feaf810c493 (patch)
tree9bb61365152da04ca5ece4dcbbd252113455930f /Doc/tutorial
parent58f9c8889d8fa79d617fddf6cb48942d3003c7fd (diff)
downloadcpython-139e7ac7c2a798820554abb6c84b9feaf810c493.zip
cpython-139e7ac7c2a798820554abb6c84b9feaf810c493.tar.gz
cpython-139e7ac7c2a798820554abb6c84b9feaf810c493.tar.bz2
[3.12] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106636)
(cherry picked from commit d0b7e18262e69dd4b8252e804e4f98fc9533bcd6) Co-authored-by: RustyNail <takonoyawarakaage@yahoo.co.jp> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/controlflow.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index c9b3d98..4336bf5 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: