def numeric_evaluation(string):
    """Evaluate string representing numeric value/expression.

    Before evaluating the string, it is checked for safety.
    If string isn't safe, an error is raised.
    """
    ### raise error if string isn't safe
    check_string_safety(string)

    ### finally evaluate the string with the custom globals
    ### dict we put together, returning the resulting value
    return eval(string, CUSTOM_GLOBALS_DICT)
Evaluate string representing numeric value/expression.

    Before evaluating the string, it is checked for safety.
    If string isn't safe, an error is raised.
    
nodezator/widget/intfloatentry/numeval.py