def guess_type(text):
    """
    Guess the type of a value encoded in a string.
    """
    # int
    try:
        int(text)
        return int
    except:
        pass

    # float
    try:
        float(text)
        return float
    except ValueError:
        pass

    # string
    return str