I recently had an error when trying to update a `__dict__` attribute in python3 since it was of type `mappingproxy` instead of `dict`, so I assumed this approach was discouraged. This however doesn't seem to be the case here, so I'll modify the PR according to your suggestion.