You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the implementation should be something more generics, i.e. support multiple conditions and multiple exprs and reduce if/elif/else into it, or support new syntax entirely like: switch { case con1: case con2: ... default: }
type MultiConditionalNode struct {
base
Conds []Node
Exprs []Node
DefaultExpr Node
}
Activity
antonmedv commentedon Apr 7, 2025
elif, you mean
else if? =))True, Else if should be added.
KyleSanderson commentedon Apr 11, 2025
What would an implementation of this look like? Any examples I can look at where you have a conditional branch?
h2hoang commentedon Jul 23, 2025
I think the implementation should be something more generics, i.e. support multiple conditions and multiple exprs and reduce
if/elif/elseinto it, or support new syntax entirely like:switch { case con1: case con2: ... default: }antonmedv commentedon Dec 14, 2025
Added support for
else ifin #879