summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/object_dict.py
blob: 7bf7094e3a0e8a28d9ba46a5eaa34fc95f1d4be8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13

class Foo:

    def __init__(self):
        self.a = 1
        self.b = "bar"

o = Foo()
if not hasattr(o, "__dict__"):
    print("SKIP")
    raise SystemExit

print(o.__dict__ == {'a': 1, 'b': 'bar'})