Comments (1)
Sorry for the slow response.
I view this as expected behavior. My stance has been attribute-style access results in an AttrDict, and key-style access results in a dict.
There is a way of replicating get
's functionality while returning an AttrDict:
>>> test = AttrDict({"a": {"b": "c"}})
>>> type(test.a)
<class 'attrdict.AttrDict'>
>>> type(test("a"))
<type 'attrdict.AttrDict'>
from attrdict.
Related Issues (20)
- AttrDict is not a dict HOT 1
- AttrDict does not provide simple constructor HOT 1
- AttrDict doesn't implement copy() HOT 1
- Provide both attrdict.AttrMapping & attrdict.AttrDict? HOT 7
- removal of `copy` broke backward compatibility HOT 5
- Property validation in __init__ method makes conclision
- Recusion problem HOT 1
- immutable AttrDict instances HOT 1
- Nested AttrDicts don't work HOT 1
- why does AttrMap return a tuple when a list is stored? HOT 11
- Is it broken or a feature? cannot update keys any more if key is a dict for AttrDict HOT 3
- inherit from OrderedDict instead of dict? HOT 3
- Override __dir__ to allow for tab completion in ipython and easier inspection HOT 3
- Empty list becomes a tuple in AttrDict HOT 1
- Bugs in doc examples HOT 3
- Allow unicode in attributes for python 3
- Accepting fixes for python3 and expanding tests to 3.5 and 3.6 HOT 2
- Pulling a list of dicts from AttrDict results in just a list of dicts.
- Using the "recursive" param shouldn't show "recursive" as an attribute
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from attrdict.