@format_field.register(u'<STR_LIT:p>')<EOL>@format_field.register(u'<STR_LIT:P>')<EOL>def format_percent_field(__, prec, number, locale):
prec = PERCENT_DECIMAL_DIGITS if prec is None else int(prec)<EOL>locale = Locale.parse(locale)<EOL>pattern = locale.percent_formats.get(None)<EOL>return pattern.apply(number, locale, force_frac=(prec, prec))<EOL>
Formats a percent field.