Open k3an3 opened 3 years ago
In Python, the following syntax is valid:
>>> x = 7 >>> 5 < x < 10 True >>> x = 1 >>> 5 < x < 10 False
However, this does not work in py-expression-eval:
>>> from py_expression_eval import Parser >>> parser = Parser() >>> parser.parse('5 < x < 10').evaluate({'x': 7}) True >>> parser.parse('5 < x < 10').evaluate({'x': 1}) True
The last result is unexpected; the parser unconditionally returns True when chaining comparison.
In Python, the following syntax is valid:
However, this does not work in py-expression-eval:
The last result is unexpected; the parser unconditionally returns True when chaining comparison.