Proposal: Decimal literals in Python.
Ben Finney
bignose+hates-spam at benfinney.id.au
Fri Oct 26 19:12:53 EDT 2007
Matimus <mccredie at gmail.com> 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
language...
> 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