Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Feb 10, 2026

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

I would suggest that we keep the old syntax but keep the ruff update. Btw ISTM that this new syntax is similar to the old print syntax which was then replaced by the () form so I still struggle to parse this.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

I like the new syntax: it means less noisy punctuation, and it's similar to the way that tuples don't need parentheses to be tuples.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@picnixz
Copy link
Member

picnixz commented Feb 10, 2026

I like the new syntax: it means less noisy punctuation, and it's similar to the way that tuples don't need parentheses to be tuples.

Yeah this kind of syntax is also annoying for me except for destructuring... (I always put parentheses around my tuples except when doing a x, y = ...) At least we agree on not agreeing! I won't block on that change (though I think it's preferrable if we decide which syntax to use because while less noisy it is still hard without it for me to read it (the comma looks like I'm done with my line so my eyes don't parse afterwards. With parentheses, I know I need to find the other closing parenthesis).

@hugovk
Copy link
Member Author

hugovk commented Feb 10, 2026

I think the SC accepting PEP 758 is a pretty good signal that it's okay to use :) This is modern Python.

With parentheses, I know I need to find the other closing parenthesis).

Ironically, your full last comment has three opening parentheses, but only two closing ones! Or perhaps an argument for using fewer parentheses ;)

@picnixz
Copy link
Member

picnixz commented Feb 10, 2026

Ironically, your full last comment has three opening parentheses, but only two closing ones! Or perhaps an argument for using fewer parentheses ;)

Yeah I saw that! well it is an argument for using fewer but it won't help me when reading (when writing it could!)

@picnixz
Copy link
Member

picnixz commented Feb 10, 2026

Btw, the only place where I found the missing parentheses in tuples was in the stdlib. I didn't see other codes doing it actually so I never knew about it! (I only learned about it when looking at our tests...)

@AlexWaygood
Copy link
Member

Btw, the only place where I found the missing parentheses in tuples was in the stdlib. I didn't see other codes doing it actually so I never knew about it! (I only learned about it when looking at our tests...)

Huh, I think it's fairly common to do for a, b in my_dict.items(): ...

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@hugovk hugovk added the needs backport to 3.14 bugs and security fixes label Feb 11, 2026
@AA-Turner AA-Turner merged commit 81484c5 into python:main Feb 11, 2026
47 checks passed
@miss-islington-app
Copy link

Thanks @hugovk for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @hugovk and @AA-Turner, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 81484c5629f9d8b698a2be58f850a0e4efe48ed3 3.14

@hugovk hugovk deleted the lib-test-ruff branch February 11, 2026 14:18
hugovk added a commit to hugovk/cpython that referenced this pull request Feb 11, 2026
…pythonGH-144656)

(cherry picked from commit 81484c5)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 11, 2026

GH-144710 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Feb 11, 2026
hugovk added a commit that referenced this pull request Feb 11, 2026
…44656) (#144710)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants