summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/class_use_other.py
blob: c6aa94ad25b2ac57c23307754e53dfe9b9e971cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# 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)