diff --git a/source/safe_eval.py b/source/safe_eval.py index cd34b3d..bf41585 100644 --- a/source/safe_eval.py +++ b/source/safe_eval.py @@ -4,8 +4,8 @@ from typing import Callable common_token_map = { # these operators and function are considered safe to use in the template operator: operator for operator in - ["+", "-", "*", "/", "%", "**", ",", "(", ")", "[", "]", "==", "!=", "in", ">", "<", ">=", "<=", "and", "or", "&", - "|", "^", "~", "<<", ">>", ":", "isinstance", "issubclass", "not", "is", "if", "else", "abs", "int", + [">=", "<=", "<<", ">>", "+", "-", "*", "/", "%", "**", ",", "(", ")", "[", "]", "==", "!=", "in", ">", "<", + "and", "or", "&", "|", "^", "~", ":", "isinstance", "issubclass", "not", "is", "if", "else", "abs", "int", "bin", "hex", "oct", "chr", "ord", "len", "str", "bool", "float", "round", "min", "max", "sum", "zip", "any", "all", "reversed", "enumerate", "list", "sorted", "hasattr", "for", "range", "type", "repr", "None", "True", "False", "getattr"