The following statement successfully executes.
simpleeval.simple_eval("a = 2")
And returns 2.
I suggest that assignment operator is entirely disallowed as input to simple eval.
Because "a == 2" can be easily mistyped as "a = 2" and existence of variable "a" is not even checked in evaluation of this input.
The following statement successfully executes.
simpleeval.simple_eval("a = 2")And returns 2.
I suggest that assignment operator is entirely disallowed as input to simple eval.
Because "a == 2" can be easily mistyped as "a = 2" and existence of variable "a" is not even checked in evaluation of this input.