[Python-ideas] Rough draft: Proposed format specifier for a thousands separator (discussion moved from python-dev)

spir denis.spir at free.fr
Wed Mar 18 09:05:25 CET 2009


Le Wed, 18 Mar 2009 08:52:20 +1200,
Greg Ewing <greg.ewing at canterbury.ac.nz> s'exprima ainsi:

> Guido van Rossum wrote:
> > I agree that the given width should include the
> > commas, but I strongly feel that leading zeros should be comma-fied
> > just like everything else.
> 
> I think we need some use cases before a proper
> decision can be made about this. If you were using
> comma-separated zero-filled numbers, what would
> your objective be, and what choice would best
> fulfill it?
> 

I think the point is just this:

   0,000,000.89
   1,234,567.89
looks right.

   0000000.89
   1,234,567.89
looks wrong.

     0000000.89
   1,234,567.89
looks wrong.

   000000000.89
   1,234,567.89
looks wrong.

------
la vita e estrany



More information about the Python-ideas mailing list