Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Using the "recursive" param shouldn't show "recursive" as an attribute #48

Open
nrhinehart opened this issue Aug 16, 2018 · 0 comments
Open

Comments

@nrhinehart
Copy link

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'])
@nrhinehart nrhinehart changed the title Using the recursive __init__ param shouldn't show recursive as an attribute Using the "recursive" param shouldn't show "recursive" as an attribute Aug 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant