GeezerVison is showing github.com — gh-88071: Update docstrings of dataclass' astuple and asdict by ischurov · Pull Request #101806 · python/cpython
Conversation
ischurov
commented
Feb 10, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Updated docstrings of astuple and asdict to reflect that they deep copy objects in the field values, according to the changes in the docs (see #26154 and #88071).
I believe that this behaviour of astuple and asdict is rather counter-intuitive and it is important to inform the developer about it in the docstring. (I personally spent half an hour trying to fix a bug that appeared because I wasn't aware of it.)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
wmayner reacted with hooray emoji
…ct that they deep copy objects in the field values, according to the changes in the docs, see python#26154
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ghost
commented
Feb 10, 2023
•
edited by ghost
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
All commit authors signed the Contributor License Agreement. 
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
hauntsaninja
changed the title
gh-88071: Update docstrings
gh-88071: Update docstrings of dataclass' astuple and asdict
Feb 19, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to mention this in the docstring as well as the docs; change LGTM.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
iritkatriel
pushed a commit
to iritkatriel/cpython
that referenced
this pull request
Mar 12, 2023
…ython#101806)
Update dataclasses.astuple and dataclasses.asdict docstrings to reflect that they deep copy objects in the field values.
Reviewers
carljm
carljm approved these changes
ericvsmith
Awaiting requested review from ericvsmith
ericvsmith is a code owner
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.