kuroko/test/testClassAnnotation.krk

11 lines
218 B
Python
Raw Normal View History

class Foo(object):
a:int = 42
b:float = 96.8
s:str = "test"
def method(self, foo: type(a)) -> type(a):
return self.a + foo
d:bool = False
print(Foo.__annotations__)
print(Foo().method(42))