[Python-ideas] Improve readability of long numeric literals
Oscar Benjamin
oscar.j.benjamin at gmail.com
Tue Feb 9 19:16:43 EST 2016
On 9 February 2016 at 23:51, Guido van Rossum <guido at python.org> wrote:
> I don't know what a bank sort code is (maybe a UK thing?)
It is a UK thing. It identifies the bank you opened your account with.
> FWIW there are some edge cases to be decided: is _123 valid? or 123_?
> or 123__456?
_123 is currently a valid identifier:
>>> _123 = 1
>>> _123
1
123_ is not. There's no good reason to allow either though. If the
purpose is to separate the digits for clarity then the underscore
doesn't need to be at the beginning or the end.
--
Oscar
More information about the Python-ideas
mailing list