def str_to_num(text):
    try:
        return int(text)
    except ValueError:
        try:
            return float(text)
        except ValueError:
            return text
Return a string or an html element which expresses a sum of this
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/str_to_num--crossover with--dataset/ETHPy150Open lsaffre/lino/lino/modlib/extjs/elems.py/FieldElement.format_sum