[issue8540] Make Context._clamp public in decimal module
Stefan Krah
report at bugs.python.org
Tue Apr 27 11:53:58 CEST 2010
Stefan Krah <stefan-usenet at bytereef.org> added the comment:
(1) Perhaps I missed the relevant part in the spec, so I had to check
what decNumber does: In the default context, clamp is 0, in the extended
contexts, it is 1. So Python's ExtendedContext should indeed set _clamp
to 1.
(2) I agree about the importance of the formats, and I think they should
be explicitly selectable like here:
http://java.sun.com/j2se/1.5.0/docs/api/java/math/class-use/MathContext.html
The current ExtendedContext is a bit of a vague concept, since it
should be exactly one of DECIMAL32, DECIMAL64 or DECIMAL128. And
none of these has prec=9.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8540>
_______________________________________
More information about the Python-bugs-list
mailing list