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/pa3-tests/core/object_attr_set.py

19 lines
200 B

4 years ago
class A(object):
a:int = 42
class B(A):
b:bool = True
def __init__(self:"B"):
print("B")
a:A = None
b:B = None
a = b = B()
b.a = 1
b.b = False
print(a.a)
print(b.a)
print(b.b)