AttrDict
AttrDict copied to clipboard
Using the "recursive" param shouldn't show "recursive" as an attribute
The recursive
parameter shouldn't modify the contents of the object.
>>> attrdict.AttrDict({'list': [{'value': 1}, {'value': 2}]}, recursive=False)
AttrDict({'list': [{'value': 1}, {'value': 2}], 'recursive': False})
Let's say I have an AttrDict
object for which my keys should be all numbers. Recursive should not be added to the keys.
>>> ad=attrdict.AttrDict({1: 'one', 2: 'two'}, recursive=False)
>>> ad.keys()
dict_keys([1, 2, 'recursive'])