def format_percent_field(__, prec, number, locale):
    """Formats a percent field."""
    prec = PERCENT_DECIMAL_DIGITS if prec is None else int(prec)
    locale = Locale.parse(locale)
    pattern = locale.percent_formats.get(None)
    return pattern.apply(number, locale, force_frac=(prec, prec))
def format_percent_field ( __ , prec , number , locale ) : prec = PERCENT_DECIMAL_DIGITS if prec is None else int ( prec ) locale = Locale . parse ( locale ) pattern = locale . percent_formats . get ( None ) return pattern . apply ( number , locale , force_frac = ( prec , prec ) )
Formats a percent field.