Micropython:
>>> class Foo:
... pass
>>> t = Foo()
>>> t.__dict__
{}
>>> t.__dict__['a'] = 4
>>> t.__dict__
{}
>>> t.a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Foo' object has no attribute 'a'
Python3:
>>> class Foo:
... pass
...
>>> t = Foo()
>>> t.__dict__
{}
>>> t.__dict__['a'] = 4
>>> t.__dict__
{'a': 4}
>>> t.a
4
Same applies for t.__dict__.update(another_dict)
Micropython:
Python3:
Same applies for
t.__dict__.update(another_dict)