1# test __dict__ attribute of a class
2
3if not hasattr(int, "__dict__"):
4    print("SKIP")
5    raise SystemExit
6
7
8# dict of a built-in type
9print("from_bytes" in int.__dict__)
10
11
12# dict of a user class
13class Foo:
14    a = 1
15    b = "bar"
16
17
18d = Foo.__dict__
19print(d["a"], d["b"])
20
21
22# dict of a class that has no locals_dict (return empty dict).
23d = type(type('')).__dict__
24print(d is not None)
25