gh-135865: Use the walrus operator in deepcopy#135857
gh-135865: Use the walrus operator in deepcopy#135857SobhanMP wants to merge 7 commits intopython:mainfrom
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! |
ZeroIntensity
left a comment
There was a problem hiding this comment.
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.
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 |
|
If it was a new code, it would be acceptable, and maybe preferable style. But this is a pure cosmetic change now. And this conflicts with existing bug fixes that have not yet been merged. |
Yeah, that's a very good reason to reject this. Sorry @SobhanMP, please don't let this demotivate you from contributing! |
|
@ZeroIntensity I was semi-expecting it to get closed; nobody likes whitespace patches. Hopefully, whoever changes the code can also incorporate these changes. |
|
@picnixz that makes sense, tho I don't think it's meaningful to change this patch. |
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.deepcopycode is too nested. #135865