@format_field.register(u'<STR_LIT:c>')<EOL>@format_field.register(u'<STR_LIT:C>')<EOL>def format_currency_field(__, prec, number, locale):
locale = Locale.parse(locale)<EOL>currency = get_territory_currencies(locale.territory)[<NUM_LIT:0>]<EOL>if prec is None:<EOL><INDENT>pattern, currency_digits = None, True<EOL><DEDENT>else:<EOL><INDENT>prec = int(prec)<EOL>pattern = locale.currency_formats['<STR_LIT>']<EOL>pattern = modify_number_pattern(pattern, frac_prec=(prec, prec))<EOL>currency_digits = False<EOL><DEDENT>return format_currency(number, currency, pattern, locale=locale,<EOL>currency_digits=currency_digits)<EOL>
Formats a currency field.