The advantage of __replace__ = None
is that it already works in all versions of Python, whereas a new argument to dataclass()
could never be used by code that needs to support Python 3.13 or older.
2 Likes