Skip to content

synt.type_check ¤

is_tuple ¤

is_tuple(exp: Expression) -> TypeGuard[Tuple]

Check if the given expression is a tuple.

Source code in synt/type_check.py
def is_tuple(exp: Expression) -> TypeGuard[synt.expr.tuple.Tuple]:
    r"""Check if the given expression is a tuple."""
    return exp.expr_type == ExprType.Tuple