def _float_or_str(value):
    """Internal method to attempt `float(value)` handling a `ValueError`
    """
    # remove any surrounding quotes
    value = QUOTE_REGEX.sub('', value)
    try:  # attempt `float()` conversion
        return float(value)
    except ValueError:  # just return the input
        return value
def _float_or_str ( value ) : value = QUOTE_REGEX . sub ( '' , value ) try : return float ( value ) except ValueError : return value
Internal method to attempt `float(value)` handling a `ValueError`