class attrdict
MonkeeSage
MonkeeSage at gmail.com
Sat Mar 3 21:06:11 EST 2007
On Mar 3, 7:54 pm, a... at mac.com (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.
Regards,
Jordan
More information about the Python-list
mailing list