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.
20 lines
339 B
20 lines
339 B
4 years ago
|
class A(object):
|
||
|
a:int = 42
|
||
|
|
||
|
def foo(self:"A", ignore:object) -> int:
|
||
|
return self.a
|
||
|
|
||
|
class B(A):
|
||
|
b:bool = True
|
||
|
|
||
|
def __init__(self:"B"):
|
||
|
print("B")
|
||
|
|
||
|
def bar(self:"B") -> int:
|
||
|
return self.foo(self.foo(print("...")))
|
||
|
|
||
|
def foo(self:"B", ignore:object) -> int:
|
||
|
return 1
|
||
|
|
||
|
print(B().bar())
|