Skip to content

[3.14] gh-65058: Document the grouping of conditional expressions (GH-162167) - #162753

Merged
encukou merged 1 commit into
python:3.14from
miss-islington:backport-08784b2-3.14
Nov 27, 2026
Merged

encukou merged 1 commit into
python:3.14from
miss-islington:backport-08784b2-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

The "Evaluation order" section said that expressions are always
evaluated from left to right, but a conditional expression evaluates
its condition first.

Add a sentence and an example showing that chained conditional
expressions group from right to left.
(cherry picked from commit 08784b2)

Co-authored-by: Lucas lucasefernandes333@gmail.com
Co-authored-by: Sam Joshva samjoshva@gmail.com
Co-authored-by: Bartosz Sławecki bartosz@ilikepython.com

…honGH-162167)

The "Evaluation order" section said that expressions are always
evaluated from left to right, but a conditional expression evaluates
its condition first.

Add a sentence and an example showing that chained conditional
expressions group from right to left.
(cherry picked from commit 08784b2)

Co-authored-by: Lucas <lucasefernandes333@gmail.com>
Co-authored-by: Sam Joshva <samjoshva@gmail.com>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
@encukou
encukou merged commit c074696 into python:3.14 Nov 27, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 27, 2026
@miss-islington
miss-islington deleted the backport-08784b2-3.14 branch November 27, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants