We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77a22ef commit 0c9b4caCopy full SHA for 0c9b4ca
Doc/reference/expressions.rst
@@ -1938,8 +1938,9 @@ Conditional expressions
1938
conditional_expression: `or_test` ["if" `or_test` "else" `expression`]
1939
expression: `conditional_expression` | `lambda_expr`
1940
1941
-Conditional expressions (sometimes called a "ternary operator") have the lowest
1942
-priority of all Python operations.
+A conditional expressions (sometimes called a "ternary operator") is an
+alternative to the if-else statement. As it is an expression, it returns a value
1943
+and can appear as a sub-expression.
1944
1945
The expression ``x if C else y`` first evaluates the condition, *C* rather than *x*.
1946
If *C* is true, *x* is evaluated and its value is returned; otherwise, *y* is
0 commit comments