circuitpython/tests/basics/object_dict.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
203 B
Python
Raw Normal View History

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'})