Open refeed opened 2 months ago
Currently, the Tirith's final_expression expression is parsed by using Python's eval() function. Though we already have the eval() usage made as safe as possible, we still need to replace it with a safer approach like using a library.
final_expression
eval()
An inspiration is to use: https://github.com/pyparsing/pyparsing/blob/master/examples/simpleBool.py
Or at least, replace eval() with https://docs.python.org/3/library/ast.html#ast.literal_eval
for the first iteration
Currently, the Tirith's
final_expression
expression is parsed by using Python'seval()
function. Though we already have theeval()
usage made as safe as possible, we still need to replace it with a safer approach like using a library.An inspiration is to use: https://github.com/pyparsing/pyparsing/blob/master/examples/simpleBool.py