Proposal: Decimal literals in Python.

Ben Finney bignose+hates-spam at
Sat Oct 27 01:12:53 CEST 2007

Matimus <mccredie at> writes:

> The trailing L [for 'long' literals] is going away in Python 3.0.

Yes. On the other hand, we are gaining '0bNNNN' for binary literals,
to go along with '0oNNNN' for octal and '0xNNNN' for hexadecimal.

So, the original poster might get further by proposing an '0dNNN.NNN'
syntax for 'decimal.Decimal' literals. At least the syntax would be
consistent and wouldn't add a new punctuation character to the

> For your consideration may I suggest a '$' prefix.

... unlike this one.

 \     "The illiterate of the future will not be the person who cannot |
  `\     read. It will be the person who does not know how to learn."  |
_o__)                                                 -- Alvin Toffler |
Ben Finney

More information about the Python-list mailing list