def str2num(s):
    'User input is always received as string, str2num will try to cast it to the right type (int or float)'

    try:
        return int(s)
    except __HOLE__:
        pass

    try:
        return float(s)
    except ValueError:
        # Fallback to the original type
        return s
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/protocol.py/str2num