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_method.py

10 lines
126 B

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