08.12.18 08:53, Henrik Bengtsson пише:
A comment from the sideline: one could imagine extending the Python syntax
with a (optional) 0d prefix that allows for explicit specification of
decimal values. They would "complete" the family:

* 0b: binary number
* 0o: octal number
* 0d: decimal number
* 0x: hexadecimal number

I understand that changing the syntax/parser is a major move. I wouldn't be
surprised if others brought up 0d before.

It is more likely that 'd' will be used for Decimal literals.

1d-2 == Decimal('0.01')

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to