Add keys for new attributes in AttributeDict
When the dictionary key already exists in AttributeDict, setting it by attribute reference works because __getattr__ returns a valid key. If the key doesn't exist, then setting a new attribute will result in an actual attribute being added to the AttributeDict. Defining __setattr__ to always set a dictionary key fixes this.
Loading
Please register or sign in to comment