-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
Initially reported in docs mailing list by Denilson Sá Maia
https://mail.python.org/archives/list/[email protected]/thread/NZTUNIYEZVY2WOF3GH6TAZ32OLMKR3QO/
https://docs.python.org/3.10/reference/expressions.html
At section 6.13, it says: “Conditional expressions (sometimes called a
“ternary operator”) have the lowest priority of all Python
operations.”
However, further down below in the "6.17. Operator precedence"
section, the if-else expression has higher precedence than both lambda
and walrus. Maybe those two are not technically "operations", but
since they are under operator precedence, they are operations.
It's confusing, and it's a minor detail, but still worth fixing.
Linked PRs
denilsonsa, rhettinger and schneiderfelipe
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir