-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-135865: Use the walrus operator in deepcopy #135857
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
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Precedent suggests it would be good to have an open issue for this even if it's just a refactor |
Will do it tonight! |
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.
We typically don't accept "cosmetic changes" (changes that just change styling or whatever), but I think this is a reasonable refactor. cc @serhiy-storchaka as the copy
maintainer.
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.
We don't need blurb entries for internal-only changes.
I'm not very fond of the "sometimes is not None" check and sometimes falsey check but I'm not sure about it. For instance, if someone uses I think we should do an |
Hi, I think the walrus operator's raison d'être was to make code like this less nested. Apologies if you do not accept whitespace fixes.
copy.deepcopy
code is too nested. #135865