from copy import copy class MyClass: def __copy__(self): print('copying ...') my_copy = type(self)() my_copy.__dict__.update(self.__dict__)
確定! 回上一頁