4 ms·
How is this different from addict? https://github.com/mewwts/addict https://github.com/mewwts/addict
by grantmc09 9y ago
How is this different from addict?
https://github.com/mewwts/addict https://github.com/mewwts/addict
- johnwheeler 9y agoI wonder if addict convert keys like "Funky Foobar Key!" into Funky_Foobar_Key? The README seems to use keys that cleanly convert to python dict keys, so it's not clear.
- chris_griffith 9y agoMostly copying and pasting from my previous comment for visibility. It works similarity to addict, but does have important distinctions and IMO seniority (was in my 'reusables' pypi project named 'Namespace' before addict existed. Just finally spun it into it's own project). Biggest differences: * Box will convert items added to the object after creation, addict does not * addict only acts as a defaultdict, Box can act as either regular or a recursive defaultdict * Box updates it’s __dir__ so that attributes (keys) are tab completed in stuff like IPython * Box has a lot of other features, such as being able to auto convert with spaces to attributes, freezing the box, and built in JSON / YAML handling.
- thisismine 9y agoand also https://github.com/bcj/AttrDict https://github.com/bcj/AttrDict.