gh-144639: Ruff: target Python 3.14 syntax in Lib/test - #144656
Conversation
AlexWaygood
left a comment
There was a problem hiding this comment.
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 <[email protected]>
Yeah this kind of syntax is also annoying for me except for destructuring... (I always put parentheses around my tuples except when doing a |
|
I think the SC accepting PEP 758 is a pretty good signal that it's okay to use :) This is modern Python.
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!) |
|
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 |
Co-authored-by: Adam Turner <[email protected]>
|
Thanks @hugovk for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Sorry, @hugovk and @AA-Turner, I could not cleanly backport this to |
…pythonGH-144656) (cherry picked from commit 81484c5) Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
|
GH-144710 is a backport of this pull request to the 3.14 branch. |
…44656) (#144710) Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…n#144656) Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…n#144656) Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…n#144656) Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Adam Turner <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.