Open bhpayne opened 4 years ago
def is_expression_ambiguous(expr_latex: str) -> bool: """ >>> is_expression_ambiguous("1/2\pi ") True >>> is_expression_ambiguous("\sin x / y") True >>> is_expression_ambiguous("\sin x + 2") True """
def is_expression_ambiguous(expr_latex: str) -> bool:
"""
>>> is_expression_ambiguous("1/2\pi ")
True
>>> is_expression_ambiguous("\sin x / y")
>>> is_expression_ambiguous("\sin x + 2")
This issue relies on having an Abstract Syntax Tree (AST) for the expression
def is_expression_ambiguous(expr_latex: str) -> bool:
"""
>>> is_expression_ambiguous("1/2\pi ")
True
>>> is_expression_ambiguous("\sin x / y")
True
>>> is_expression_ambiguous("\sin x + 2")
True
"""