gh-108751: Add copy.replace() function (GH-108752)
It creates a modified copy of an object by calling the object's __replace__() method. It is a generalization of dataclasses.replace(), named tuple's _replace() method and replace() methods in various classes, and supports all these stdlib classes.
S
Serhiy Storchaka committed
6f3c138dfa868b32d3288898923bbfa388f2fa5d
Parent: 9f0c0a4
Committed by GitHub <noreply@github.com>
on 9/6/2023, 8:55:42 PM