summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: