Skip to content

Commit 25f6b49

Browse files
lul-casjohnslavik
andcommitted
Revert "gh-65058: Note that conditional expressions are not evaluated left to right"
This reverts commit ba6ac10. Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
1 parent f7f8f56 commit 25f6b49

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎Doc/reference/expressions.rst‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,10 +2534,8 @@ Evaluation order
25342534

25352535
.. index:: pair: evaluation; order
25362536

2537-
Python evaluates expressions from left to right (except for
2538-
:ref:`conditional expressions <if_expr>`, which evaluate the condition first).
2539-
Notice that while evaluating an assignment, the right-hand side is evaluated
2540-
before the left-hand side.
2537+
Python evaluates expressions from left to right. Notice that while evaluating
2538+
an assignment, the right-hand side is evaluated before the left-hand side.
25412539

25422540
In the following lines, expressions will be evaluated in the arithmetic order of
25432541
their suffixes::
@@ -2548,7 +2546,6 @@ their suffixes::
25482546
expr1 + expr2 * (expr3 - expr4)
25492547
expr1(expr2, expr3, *expr4, **expr5)
25502548
expr3, expr4 = expr1, expr2
2551-
expr2 if expr1 else expr3
25522549

25532550

25542551
.. _operator-summary:

0 commit comments

Comments
 (0)