Uh oh!
There was an error while loading. Please reload this page.
gh-135676: Reword the Operators & Delimiters section(s) - #137713
Conversation
Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
encukou
commented
Aug 20, 2025
So, I looked at this and #99000 again, and found a better (IMO) way to present the information. What do you think? What this PR is missing now is information from some existing notes:
I'll try adding a section for that next week. |
Uh oh!
There was an error while loading. Please reload this page.
| | arithmetic_operator | ||
| | bitwise_operator | ||
| | comparison_operator | ||
| | enclosing_delimiter | ||
| | other_delimiter | ||
| | assignment_operator | ||
| | other_op | ||
| | "..." |
There was a problem hiding this comment.
Should e.g. assignment op be higher? += is a longer string than +.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…GH-137713) (cherry picked from commit cfcfbdd) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-138457 is a backport of this pull request to the 3.14 branch. |
…GH-137713) Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Lexically, there is no difference between operators and delimiters, so I combined the section.
This section also serves as a kind of guide for what all the ASCII "symbol" characters do, with notes like “The period can also occur in floating-point and imaginary literals” and “The following printing ASCII characters are not used in Python”.
I've expanded the notes to include
@,{, etc., but (for now) stopped short of adding a table of ASCII characters with links to where they appear.The tables of symbols are reorganized slightly.
.was added to operators (like@, it can be either operator or delimiter).->was moved from augmented assignment to delimiters.📚 Documentation preview 📚: https://cpython-previews--137713.org.readthedocs.build/