You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/pa1-tests/core/class_constructor.py

9 lines
113 B

class Foo(object):
x:int = 0
def __init__(self:"Foo", x:int):
self.x = x
f = Foo(1)
print(f.x)