[Python-Dev] New operations in Decimal

Terry Reedy tjreedy at udel.edu
Thu May 10 23:24:57 CEST 2007


"Facundo Batista" <facundo at taniquetil.com.ar> wrote in message 
news:f18754$2c2$1 at sea.gmane.org...
| Nick Maclaren wrote:
|
| > Am I losing my marbles, or is this a proposal to add the logical
| > operations to FLOATING-POINT?
|
| Sort of. This is a proposal to keep compliant with the General Decimal
| Arithmetic Specification, as we promised.
|
|  http://www2.hursley.ibm.com/decimal/

I oppose adding this illogical nonsense to Python.  Who would ever use it?

An intention and promise to keep compliant with a *decimal arithmetic* 
standard cannot sanely be a blind, open-ended promise to add whatever 
*non-decimal* functions that IBM puts where they do not belong as part of 
its commercial strategem.  To me, the same would go for any other standard 
similarly twisted.

Supposed IBM defined a mapping between pairs of decimal digits and an ascii 
subset (printables and the few control chars actually used by most people). 
Suppose IBM further defined string functions for decimal nuumbers 
intrerpreted as strings.  An example might be 'capitalize', such that
capitalize(010203) == 010203
capitalize(121110) == 424140 # 10='a', 40 = 'A', etc
And suppose that IBM shoved this into the decimal standard the same way it 
did with the decimal-interpreded-as-binary-string' functions.  Would you 
really add them to be 'compliant' with IBM?

If you really do put them in, turn 'invert' into 'prefix_not'.  For the 
prefix, please not 'logical' but something like 'lu' (for 'lunatic') or, 
less provocatively, 'ibm'.

Terry Jan Reedy







More information about the Python-Dev mailing list