def autotype(s):
    '''Automatively detect the type (int, float or string) of `s` and convert
    `s` into it.'''

    if not isinstance(s, str):
        return s

    if s.isdigit():
        return int(s)

    try:
        return float(s)
    except __HOLE__:
        return s
dataset/ETHPy150Open moskytw/clime/clime/util.py/autotype