[Python-Dev] Sort out formatting differences in decimal and float

skip at pobox.com skip at pobox.com
Sat Dec 5 16:17:12 CET 2009

    Mark> So should commas be inserted for any fill character at all? 

While I'm at it, it makes no sense to me to pad numbers with anything other
than whitespace or zero.  (BTW: I have never liked the new format() stuff,
so I will be sticking with %-formatting as long as it exists in Python.  My
apologies if I don't understand some amazing generality about format(), but
if you do dumb stuff like ask for comma separation of a number then ask to
pad it with '*' you get what you deserve.)

    Mark> There's already a good way to ask for zero padding, by using the
    Mark> leading zero, as in '020,g'.  Why would you use '0=20,g' instead?

Note to the implementers: '0=20,g' has no mnemonic significance as far as I
can tell.  I thought it was my mail program failing to properly decode a bit
of quoted printable text.


More information about the Python-Dev mailing list