-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
In Python, the following syntax is valid:
>>> x = 7
>>> 5 < x < 10
True
>>> x = 1
>>> 5 < x < 10
FalseHowever, 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})
TrueThe last result is unexpected; the parser unconditionally returns True when chaining comparison.
Metadata
Metadata
Assignees
Labels
No labels