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.
15 lines
208 B
15 lines
208 B
9 years ago
|
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'})
|