import decimal


def _str_to_Decimal_dps(s):
    """Convert a string to pair of a Decimal instance and its precision."""
    try:
        num = decimal.Decimal(s)
    except decimal.InvalidOperation:
        raise ValueError(f'string-float not recognized: {s}')
    else:
        return num, len(num.as_tuple().digits)