Closed kaiwang0112006 closed 4 years ago
Yes, take a look at rule.context.symbols
:
In [1]: import rule_engine
In [2]: rule = rule_engine.Rule('a>0.5')
In [3]: rule.context
Out[3]: <rule_engine.engine.Context at 0x7f07cf52a350>
In [4]: rule.context.symbols
Out[4]: {'a'}
After building a rule like
Is there a build-in method that can reture the varible name of the rule, like