def ap_eval(instr,vardict):
    '''evaluate an expression string using vardict namespace'''
    t=tokenize(instr)
    s=convert(t)
    ans=proc_stack(s,vardict)
    return ans
evaluate an expression string using vardict namespace
recipes/Python/577333_Numerical_type_units/recipe-577333.py