Robin Becker <ro...@reportlab.com> writes: > A reportlab user found he was doing the wrong thing by calling canvas.save > repeatedly, our documentation says you should not use Canvas objects after > the > save method has been used. The user had mixed results :( > > It would be better to make the canvas object completely immutable all the way > down when save has been called, but I think that's quite hard as these > objects > have quite a large and varied set of attributes, lists other objects > dictionaries etc etc.
If changing things happen at an elementary level (by assigning to the object's instance attributes), then you could implement your on "__setattr__/__delattr__" methods. There, you could check whether you are ready to allow the change or reject it. -- https://mail.python.org/mailman/listinfo/python-list