Additional "size" key being added to DotMap when converting from a nested dictionary · Issue #97 · drgrib/dotmap · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I convert a nested dictionary, it appears that additional items are added to the DotMap with the keys named "size" or "compute."
This sometimes causes the problem when doing "for k, v in DotMapObject.items():"
Those additional items will also stay when converting back to the dictionary.
Does anyone know why? and how to avoid that?
The text was updated successfully, but these errors were encountered:
"a" in d=False
Traceback (most recent call last):
File "C:\software\repos\myrepo\tests\dotmap_autovivification.py", line 10, in <module>
d.a
File "C:\software\miniforge\envs\myenv\Lib\site-packages\dotmap\__init__.py", line 125, in __getattr__
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{k}'") from None
AttributeError: 'DotMap' object has no attribute 'a'
When I convert a nested dictionary, it appears that additional items are added to the DotMap with the keys named "size" or "compute."
This sometimes causes the problem when doing "for k, v in DotMapObject.items():"
Those additional items will also stay when converting back to the dictionary.
Does anyone know why? and how to avoid that?
The text was updated successfully, but these errors were encountered: