You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A. define deepcopy() method on the uncopyable object to make it copyable. downside: who knows what object the user will be using? This solution would have to be manually implemented for certain types
B. Use deepcopy differently. Maybe there's some sort of argument I can pass in? Answer: no
C. Define my own deepcopy. See links 1, 2, and 3. Also the source code for the deepcopy
Currently I use deepcopy to save the state: https://docs.python.org/3.6/library/copy.html#copy.deepcopy
This means the types must be serializable by deepcopy, which unfortunately has some major limitations:
Imports are not saved (although you can still use imports in the saved section, the import will just happen twice)
Conditional imports and imports in functions may not work
File I/O does not work (TextIOWrapper is not serializable)
Please comment below if you run into any issues with #$save
The text was updated successfully, but these errors were encountered: