blob: e6fb7b3d9c2f72b265f2b1c3f7390a6693903147 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import sys
class Foo:
def __init__(self):
self.a = 1
self.b = "bar"
o = Foo()
if not hasattr(o, "__dict__"):
print("SKIP")
sys.exit()
print(o.__dict__ == {'a': 1, 'b': 'bar'})
|