That’s awesome!!
Will the typeshed have an appropriate base class? Maybe something like:
class SupportsReplace[**P]:
def __replace__(self, **kwargs: P.kwargs) -> Self:
...
# copy.replace:
def replace[T: SupportsReplace[P], **P](obj: T, /, **changes: P.kwargs) -> T:
...
I’m not sure if the latter annotation is allowed?