On Sat, Dec 5, 2009 at 1:18 PM, <s...@pobox.com> wrote: > > >>> format(Decimal(1234), '020,g') > '0,000,000,000,001,234' > >>> format(Decimal(1234), '0=20,g') > '0000000000000001,234' > > Why in the world would you ever want to insert commas as separators and not > use them consistently?
So should commas be inserted for any fill character at all? Or should only '0' be special-cased? What about other digits used as fill characters? What about other non-ascii zeros? Should those be special-cased too? I'm reluctant to add extra special cases and complication to what's already quite a complicated specification; it seems better to keep it simple (well, as simple as possible) and orthogonal. There's already a good way to ask for zero padding, by using the leading zero, as in '020,g'. Why would you use '0=20,g' instead? I'm not sure that the 'X=...' notation was intended to be used for zero padding. Mark _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com