Skip to content

Docs give incorrect grouping for conditional expressions #96417

@kaya3

Description

@kaya3

Documentation

Quoting from 6.17 Operator Precedence:

Operators in the same box group left to right (except for exponentiation, which groups from right to left).

Another exception should be included for conditional expressions, which also group from right to left: a if b else c if d else e is equivalent to a if b else (c if d else e), not (a if b else c) if d else e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixesdocsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions