remove custom __copy__

no longer necessary now that we're not locking anything
master
jan 6 months ago
parent 33529f5ed3
commit 24c77fd3c3

@ -1,4 +1,4 @@
from typing import Callable, Self, TYPE_CHECKING
from typing import Callable, TYPE_CHECKING, Any
from abc import ABCMeta, abstractmethod
import numpy
@ -32,12 +32,12 @@ class Shape(PositionableImpl, Rotatable, Mirrorable, Copyable, Scalable,
"""
__slots__ = () # Children should use AutoSlots or set slots themselves
def __copy__(self) -> Self:
cls = self.__class__
new = cls.__new__(cls)
for name in self.__slots__: # type: str
object.__setattr__(new, name, getattr(self, name))
return new
#def __copy__(self) -> Self:
# cls = self.__class__
# new = cls.__new__(cls)
# for name in self.__slots__: # type: str
# object.__setattr__(new, name, getattr(self, name))
# return new
#
# Methods (abstract)

Loading…
Cancel
Save