bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. (GH-14390)

This commit is contained in:
Serhiy Storchaka 2019-06-26 19:07:44 +03:00 committed by GitHub
parent 69150669f2
commit 2d88e63bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -1206,7 +1206,7 @@ class C(Base):
unsafe_hash=unsafe_hash, frozen=frozen)
def replace(obj, **changes):
def replace(obj, /, **changes):
"""Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage: