Visitar URL original
bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. by serhiy-storchaka · Pull Request #14390 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20221223110330/https://github.com/python/cpython/pull/14390
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jun 26, 2019 •

Copy link
Member

@vstinner vstinner left a comment

LGTM.

@@ -356,7 +356,7 @@ Module-level decorators, classes, and functions
def add_one(self):
return self.x + 1

.. function:: replace(instance, **changes)
.. function:: replace(instance, /, **changes)
Copy link
Member

@vstinner vstinner Jun 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a versionchanged 3.9 markup to document this subtle change?

Copy link
Member Author

@serhiy-storchaka serhiy-storchaka Jun 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not added in other 35 cases. If it is needed it should be added in all cases.

@serhiy-storchaka serhiy-storchaka merged commit 2d88e63 into python:master Jun 26, 2019
@serhiy-storchaka serhiy-storchaka deleted the dataclasses-replace-obj branch Jun 26, 2019
@vstinner
Copy link
Member

vstinner commented Jun 26, 2019

I am also fine with not documenting the change. That's why I approved your PR 😉

lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants