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
git grep 'def copy' reveals a number of classes that define ad-hoc copy methods but not __copy__ methods. Hence, they do not implement the copy protocol https://docs.python.org/3/library/copy.html, so copy.copy will resort to pickling/unpickling for making a copy.
Components.copy, for example, implements an ad-hoc version of a deepcopy of sorts:
for ind, val in self._comp.items():
if isinstance(val, SageObject) and hasattr(val, 'copy'):
result._comp[ind] = val.copy()
else:
result._comp[ind] = val
For classes whose instances are immutable, see #13811 instead.
git grep 'def copy'
reveals a number of classes that define ad-hoccopy
methods but not__copy__
methods. Hence, they do not implement the copy protocol https://docs.python.org/3/library/copy.html, socopy.copy
will resort to pickling/unpickling for making a copy.Components.copy
, for example, implements an ad-hoc version of a deepcopy of sorts:For classes whose instances are immutable, see #13811 instead.
CC: @tscrim @mjungmath @nbruin @kwankyu @kcrisman @egourgoulhon
Component: manifolds
Issue created by migration from https://trac.sagemath.org/ticket/32476
The text was updated successfully, but these errors were encountered: