Skip to content

Commit 139e7ac

Browse files
miss-islingtonRustyNailterryjreedy
authored
[3.12] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106636)
(cherry picked from commit d0b7e18) Co-authored-by: RustyNail <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 58f9c88 commit 139e7ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/tutorial/controlflow.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,9 @@ you can use the class name followed by an argument list resembling a
307307
constructor, but with the ability to capture attributes into variables::
308308

309309
class Point:
310-
x: int
311-
y: int
310+
def __init__(self, x, y):
311+
self.x = x
312+
self.y = y
312313

313314
def where_is(point):
314315
match point:

0 commit comments

Comments
 (0)