3 ms·
Something like that would be handy. Just to clarify the addict mention. It works similarity to addict, but does have important distinctions and IMO seniority (
by chris_griffith 9y ago
Something like that would be handy. Just to clarify the addict mention.
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 defaultdict
* Box updates it’s __dir__ so that attributes (keys) are tab completed in stuff like IPython
* Box repr clearly shows it is an object