> 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:
>>> a=D()
>>> a.lol = 2
>>> a['get'] = 'foo'
>>> a
{'get': 'foo', 'lol': 1}
>>> vars(a)
{}