def from_i3number(s, l, toks):
    """
    Convert an I3 "number" to an int or float for python.
    :param s: passed in from callback
    :param l: passed in from callback
    :param toks: token to be modified
    :return: numeric type from token
    """
    n = toks[0]
    try:
        return int(n)
    except ValueError:
        return float(n)