@format_field.register(u'<STR_LIT:d>')<EOL>@format_field.register(u'<STR_LIT:D>')<EOL>def format_decimal_field(__, prec, number, locale):
prec = <NUM_LIT:0> if prec is None else int(prec)<EOL>if number < <NUM_LIT:0>:<EOL><INDENT>prec += <NUM_LIT:1><EOL><DEDENT>return format(number, u'<STR_LIT>' % prec)<EOL>
Formats a decimal field:

    .. sourcecode::

       1234 ('D') -> 1234
       -1234 ('D6') -> -001234