
Feb. 14, 2015
2:46 a.m.
Andrew Barnert wrote:
I think it's reasonable for a target to be able to assume that it will get a setattr or setitem when one of its subobjects is assigned to. You might need to throw out cached computed properties, ...
That's what I was thinking. But I'm not sure it would be a good design, since it would *only* catch mutations made through in-place operators. You would need some other mechanism for detecting mutations of sub-objects made in other ways, and whatever mechanism you used for that would probably catch in-place operations as well. -- Greg