MonkeeSage <[EMAIL PROTECTED]> wrote: > On Mar 3, 7:54 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > > Besides missing the warning in the __init__, this also has pretty weird > > behavior whenever subject to a .pop, .update, .setdefault, del of either > > item or attr, etc, etc: the attributes and items "get out of sync" (and, > > catching each and every mutating-method to keep the separate dicts of > > items and attrs in perfect sync is somewhat of a nightmare). > > Good points. There are many complexities involved, and little actual > gain. Saving three or four chars isn't worth all the trouble. I hadn't > fully thought-out the situation.
You make a good point. I do like being able to say foo.bar=baz rather than foo['bar']=baz in certain cases -- not so much to save 3 chars, but to avoid excessive punctuation; however, I don't really need this AND all of dict's power at the same time, so, I don't inherit from dict:-). Alex -- http://mail.python.org/mailman/listinfo/python-list