mirror of https://github.com/python/cpython.git
[3.11] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106637)
(cherry picked from commit d0b7e18262
)
Co-authored-by: RustyNail <takonoyawarakaage@yahoo.co.jp>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
da15b12d8d
commit
549b528abe
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue