Closed octaviancorlade closed 3 years ago
Currently it's not possible to:
from py_expression_eval import Parser parser = Parser() parser.functions = { **parser.functions, "int": int } parser.evaluate("int(a)", {"a": "3"})
It would parse int as the string operator in t(a) and therefore raise
int
in t(a)
Exception: parse error [column 6]: parity, expression: int(a)
This fixes it so it behaves the same way as not, and, or and xor requiring these operators to be followed by a space. I don't think anyone would use the in operator without a space after it, but that could be a concern to keep in mind.
not
and
or
xor
in
Thank you!
Currently it's not possible to:
It would parse
int
as the string operatorin t(a)
and therefore raiseThis fixes it so it behaves the same way as
not
,and
,or
andxor
requiring these operators to be followed by a space. I don't think anyone would use thein
operator without a space after it, but that could be a concern to keep in mind.