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

Yury Selivanov report at bugs.python.org
Wed Nov 7 00:04:32 CET 2012


New submission from Yury Selivanov:

Right now decimal.py defines 'ROUND_DOWN' as 'ROUND_DOWN' (string), whereas C version define it as 1 (integer).

While using constant values directly in your code is not a good idea, there is another case where it doesn't work: if you serialize decimal values along with their meta information, such as rounding settings.  In this case, when you unserialize data that was serialized with python decimal, those meta-settings won't work for 'c' decimal.

----------
messages: 175024
nosy: skrah, yselivanov
priority: normal
severity: normal
status: open
title: Decimal constants should be the same for py & c module versions
type: behavior
versions: Python 3.3, Python 3.4

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


More information about the Python-bugs-list mailing list