> Almost, he is also converting ordinary dicts that get added as items to his own Dict class
You are right I dind't notice that before.
But looking at the code it seems that the only permitted values are dict and str?!
> But yes, the idea of storing everything twice (once as an item and once as an attribute)
I don't get that, you don't store things twice and nothing breaks, at least with the example code I wrote above. Try:
The only permitted keys are str, and the rest are silently ignored. This is another bug in his implementation (only the first line should be indented, but both are).
Your code is fine - you're not storing everything twice, but he is (in _set_both()).
You are right I dind't notice that before. But looking at the code it seems that the only permitted values are dict and str?!
> But yes, the idea of storing everything twice (once as an item and once as an attribute) I don't get that, you don't store things twice and nothing breaks, at least with the example code I wrote above. Try: