Feature or enhancement
tarfile.TarInfo.replace() already has the semantics of copy.replace(), but the class does not support the protocol.
I propose to add __replace__ = replace, so that copy.replace(member, name='other') works like member.replace(name='other').
Linked PRs
Feature or enhancement
tarfile.TarInfo.replace()already has the semantics ofcopy.replace(), but the class does not support the protocol.I propose to add
__replace__ = replace, so thatcopy.replace(member, name='other')works likemember.replace(name='other').Linked PRs