[issue16422] Decimal constants should be the same for py & c module versions

Stefan Krah report at bugs.python.org
Wed Nov 7 10:36:11 CET 2012


Stefan Krah added the comment:

It would be possible to translate strings to integers; the infrastructure
is already there for pickling. The decision not to do that was actually
deliberate: Up to now no one has requested string constants for rounding
modes and I *suspect* that there's a performance penalty even though I
didn't measure it.


See Modules/_decimal/_decimal.c:1211 for the code that would need to
be called each time something like this occurs:

  context.rounding = ROUND_UP

----------

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


More information about the Python-bugs-list mailing list