Having a class C
with an attribute coordinates
.
class C():
def __init__():
self.coordinates=[]
c = C()
coords = c.coordinates
if I change now coords
, I would like to change it only "local", so I would like to detach coords
from C
, so that c.coordinates
isn't changed.
Is there a better way than
coords_ = coords[:]