Skip to content

Tweak wording for dataclasses.replace #117758

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

Merged
merged 2 commits into from
Apr 14, 2024
Merged

Conversation

Gouvernathor
Copy link
Contributor

@Gouvernathor Gouvernathor commented Apr 11, 2024

The initial phrasing mentioned values, when it's actually the keys that are in question.
It also could mean that passing no kwarg at all was invalid, since in that case **changes does not technically specify a field. So, this clarifies that dataclasses.replace(obj) is a valid way to shallow-clone a dataclass object, even though I didn't write it explicitly.


📚 Documentation preview 📚: https://cpython-previews--117758.org.readthedocs.build/

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Apr 11, 2024
@ericvsmith ericvsmith merged commit e7cce2a into python:main Apr 14, 2024
@erlend-aasland erlend-aasland added the needs backport to 3.12 only security fixes label Apr 14, 2024
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 14, 2024
(cherry picked from commit e7cce2a)

Co-authored-by: Gouvernathor <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Apr 14, 2024

GH-117876 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Apr 14, 2024
@Gouvernathor Gouvernathor deleted the patch-4 branch April 14, 2024 16:50
erlend-aasland pushed a commit that referenced this pull request Apr 14, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants