[issue8540] Make Context._clamp public in decimal module

Mark Dickinson report at bugs.python.org
Tue Apr 27 12:15:55 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Hmm.  Yes, the spec itself is rather vague on the subject of clamping, so I withdraw my claim that clamping is necessary for compliance with the spec.  It *is* necessary to make the those testcases with 'clamp=1' pass, though.

So from the point of view of compliance with the specification it's fine to leave the _clamp attribute private.

I agree it would be useful to give easy access to the IEEE 754 formats, though, for interoperability with C and Java (thanks for the Java link!).  The most important formats are decimal32, decimal64 and decimal128, but IEEE 754 also specifies parameters for decimal{k} where k is any multiple of 32 bits.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8540>
_______________________________________


More information about the Python-bugs-list mailing list