Underscores in Python numbers

bonono at gmail.com bonono at gmail.com
Sat Nov 19 20:45:42 EST 2005


Steven D'Aprano wrote:
> That's a tad unfair. Dealing with numeric literals with lots of digits is
> a real (if not earth-shattering) human interface problem: it is hard for
> people to parse long numeric strings. In the wider world outside of IT,
> people deal with long numeric digits by grouping. This is *exceedingly*
> common: mathematicians do it, economists do it, everybody who handles long
> numeric literals does it *except* computer language designers.
However, what is the percentage of these big number literals appears in
source code ? I believe most of them either appears in some data
file(thus is nothing but string) or during data input(again string).
Why change the language when we just want a smarter string converter ?




More information about the Python-list mailing list