Feb-17-2019, 11:26 AM
(This post was last modified: Feb-17-2019, 04:10 PM by AlekseyPython.)
When I used the pickle library, it turned out that it does not save the current values of the class members (after recovery pickle fills them with the original values). Pickle save only current values of instance variables. Therefore, I wrote a class 'AbstractSavingObject', which implements saving, including the current values of class variables. Now I want to give this opportunity to all my classes (for the ability to save in a dump all objects when an exception occurs) and do not want to write inheritance from 'AbstractSavingObject' everywhere.
How to do this?
How to do this?