Allow setting attributes in MagicDict
Just like how we can do element.id
to access element['id']
, we should be able to assign to items using attributes. This implies implementing MagicDict.__setattr__
, similarly to the existing __getattr__
and __delattr__
.