fix https://github.com/rnag/dotwiz/issues/24 #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #24
@rnag @orlof
also relevant articles:
https://stackoverflow.com/questions/51540806/how-to-auto-update-keys-from-a-class-inherited-from-dict/51541098#51541098
https://towardsdatascience.com/python-inheritance-should-you-inherit-from-dict-or-userdict-9b4450830cbb
https://treyhunner.com/2019/04/why-you-shouldnt-inherit-from-list-and-dict-in-python/
http://www.kr41.net/2016/03-23-dont_inherit_python_builtin_dict_type.html
https://stackoverflow.com/a/39375731/1426932
regarding inheriting from dict vs UserDict vs collections.abc.MutableMapping, which involves tradeoffs in performance vs complexity; in particular https://treyhunner.com/2019/04/why-you-shouldnt-inherit-from-list-and-dict-in-python/ sheds some light on why the bug was occuring. Future work should investigate deriving from collections.abc.MutableMapping which might have less gotchas compared to inheriting from dict, but maybe more performant than inheriting from UserDict