KEMBAR78
bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. by serhiy-storchaka · Pull Request #14390 · python/cpython · GitHub
Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

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

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

return self.x + 1

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

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

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 June 26, 2019 16:07
@vstinner
Copy link
Member

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.

4 participants