[Python-Dev] New operations in Decimal
Terry Reedy
tjreedy at udel.edu
Fri May 11 05:45:31 CEST 2007
"Raymond Hettinger" <python at rcn.com> wrote in message
news:20070510185924.BIU37629 at ms09.lnh.mail.rcn.net...
| > I oppose adding this illogical nonsense to Python. Who would ever use
it?
|
| Doesn't matter. What is more important is that we provide a module that
is
| fully compliant with the specification and passes all of its tests. The
value
| is in the compliance, not in the relative value of individual parts of
the spec.
To repeat my further question: if IBM adds string functions or anything
else to the 'decimal arithmetic' spec, should we unthinkingly add them
also?
Is there there no limit to the size of the camel that comes in with the
nose?
Suppose the next edition of the spec contains decimal versions of the
functions in numpy (BLAS, LINPACK, FTTPACK, and so on). Should they be
included in the standard lib even while numpy is excluded.
We supposedly have a standard for additions to the standard lib. I cannot
think of any other module being admitted with what amounts to an unlimited
blank check for further additions.
| This is somewhat akin to modules supporting RFC specs or internet
| protocols. It is more important to be standard than it is to pick and
choose
| the parts you like.
My impresssion from reading this list is that some of the modules
supporting such specs/protocols are not complete and that there has been
some picking and choosing. Wasn't there recently discussion about DOM
level compliance?
In any case, once RFCs are finalized, they does not, as far as I know,
grow with additions, sane or crazy. Nex stuff goes in a new RFC which can
be evaluated separately against our normal criteria for stdlib additions.
| While I question the sanity of the spec writers in this case, I do trust
that
| overall, they have provided an extremely well thought-out spec, have gone
| through extensive discussion/feedback cycles, and have provided a
thorough
| test-suite. It is as good as it gets.
I had the same opinion until I saw the logic stuff. But I have known IBM
and its products, good and bad, for over 40 years, so it does not surprise
me when they act somewhat imperialistically for commercial advantage. This
strikes me as likely such a case. But I may give M.C. a chance to better
educate me.
In the meanwhile here is my suggestion.
Segregate the binary digit functions, and anything else of their ilk, in a
separate module, say decimal_extras, and make it available on PyPI. In
decimal, add
try:
from decimal_extras import *
except ImportError:
pass
Then the tests could pass without junking up the stdlib with stuff that
would never even be proposed, let alone accepted.
And should I be proved wrong, and these functions find favor with the
community and usage in production code, then they can be seamlessly moved
into the stdlib and the decimal module after having met the test of other
additions.
Terry Jan Reedy
More information about the Python-Dev
mailing list