Underscores in Python numbers

Mike Meyer mwm at mired.org
Sun Nov 20 05:39:22 CET 2005


Roy Smith <roy at panix.com> writes:
> Mike Meyer <mwm at mired.org> wrote:
>> I've seen at least one language (forget which one) that allowed such
>> separators, but only for groups of three.
> That seems a bit silly.  Not all numbers are naturally split into groups of 
> three.  Credit card numbers are (typically) split into groups of four.  
> Account numbers are often split into all sorts of random groupings.

True. But how often do you want to add two account numbers, or
multiply two credit card numbers? Or display them in hex, or otherwise
treat them as something other than a string that happens to be
composed of digits?

      <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list