[Python-ideas] Improve readability of long numeric literals
Serhiy Storchaka
storchaka at gmail.com
Wed Feb 10 08:09:23 EST 2016
On 09.02.16 23:40, Manuel CerĂ³n wrote:
> Sometimes it's hard to read long numbers. For example:
>
> >>> opts..write_buffer_size = 67108864
>
> Some languages (Ruby, Perl, Swift) allow the use of underscores in
> numeric literals, which are ignored. They are typically used as
> thousands separators.
Some languages allow the use of ' (an apostrophe) as thousands separators:
67'108'864
But I prefer underscores as more common variant.
More information about the Python-ideas
mailing list