Skip to main content

python_conditional_expression_operands

Function python_conditional_expression_operands 

Source
pub fn python_conditional_expression_operands(
    node: Node<'_>,
) -> Option<[Node<'_>; 3]>
Expand description

The operands of a Python conditional expression (value if test else alternative).

The grammar leaves conditional_expression without fields, so its operands can only be selected positionally. Skipping extras is required: a backslash line continuation before else otherwise appears as a fourth named child and trips the operand-count check (#4797).