Simplify implementation of __replace__()
2 files changed