Skip to content

Metadata

Flavio Lionel Rita edited this page Apr 25, 2021 · 1 revision
function description
vars list of variables on expression
constants list of constants on expression
operators list of operators on expression
functions list of functions on expression

example:

from py_expression.core import Exp
exp = Exp()

op = exp.parse('"expression".count("e")>= a+1')
vars = op.vars()
constants = op.constants()
operators = op.operators()
functions = op.functions()

print(vars)
print(constants)
print(operators)
print(functions)                            

Output:

{'a': 'any'}
{'expression': 'str', 'e': 'str', 1: 'int'}
{'>=': 'comparison', '+': 'arithmetic'}
{'count': {'isChild': True}}
Clone this wiki locally