When evaluating rules that compare a string variable to a string literal, the library misinterprets the string literal as a float if there are float values present in the evaluation context.
record = {'var':'epa1',"var_2":10,"var_3":0.4}
ctx = Context(record)
result = evaluate('var == "epa1"', ctx) # The literal 'epa1' is actually being interpreted as epa1.0`
print(result) #<-This is False
result2 = evaluate('string("epa1")', ctx)
print(result2) #<-This is epa1.0
Edit: The number doesn't have to be at the end of the string for it to be converted to float. "epa1epa" -> epa1.0epa
When evaluating rules that compare a string variable to a string literal, the library misinterprets the string literal as a float if there are float values present in the evaluation context.
Edit: The number doesn't have to be at the end of the string for it to be converted to float. "epa1epa" -> epa1.0epa