[Python-Dev] Decimal conversion to string (original) (raw)

Edward Loper edloper at gradient.cis.upenn.edu
Wed Apr 14 22:24:13 EDT 2004


[Facundo wrote:]

Anyway, if you want to change the repr() behaviour, you should push it hard to the list. I'm -0 on it.

+1 on changing the repr behavior to show:

Decimal('12345')

Instead of:

Decimal(0, (1, 2, 3, 4, 5, 0))

Using the latter representation puts up an unnecessary barrier to using decimal, that I'm guessing many people (esp newbies) won't want to put up with. In particular, it makes decimal much less friendly for interactive use.

-Edward



More information about the Python-Dev mailing list