Closed ortk95 closed 4 months ago
Implementation will be very similar to the existing copy methods, so should be relatively simple. E.g. implementation will probably be something like
copy
def __replace__(self, **changes) -> Self: kwargs = self._get_kwargs() | changes new = self.__class__(**kwargs) self._copy_options_to_other(new) return new
https://docs.python.org/3.13/library/copy.html#copy.replace
Implementation will be very similar to the existing
copy
methods, so should be relatively simple. E.g. implementation will probably be something likehttps://docs.python.org/3.13/library/copy.html#copy.replace