3 ms·
I haven't tried it but here's some issues from a superficial code review: This uses twice as much memory as it needs to (and opens the door to potential incons
by zb 12y ago
I haven't tried it but here's some issues from a superficial code review:
This uses twice as much memory as it needs to (and opens the door to potential inconsistency) by storing everything redundantly in both the attributes dictionary and the underlying dict.
Setting an item with a non-string key (e.g. An int or even unicode) is silently ignored.
myDict[u'foo'] = 'bar' # <- this ought to do something
Setting or deleting an item with the same name as an existing attribute (e.g. the name of a method) will replace or delete that attribute.
myDict['get'] = 'foo' # <- should not replace the method myDict.get
This can't be initialised with kwargs or an iterator like an ordinary dict can.
- mewwts 12y agoThanks so much for your input. All of this is now fixed!