I would like to make a copy of a class instance in python. I tried copy.deepcopy but I get the error message:
copy.deepcopy
RuntimeError: Only Variables cr
Yes you can make a copy of class instance using deepcopy:
from copy import deepcopy c = C(4,5,'r'=2) d = deepcopy(c)
This creates the copy of class instance 'c' in 'd' .