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.

13 lines
166 B

4 years ago
# check that we can use an instance of B in a method of A
class A:
def store(a, b):
a.value = b
class B:
pass
b = B()
A.store(b, 1)
print(b.value)