New submission from Yury Selivanov:

Right now 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 <>
Python-bugs-list mailing list

Reply via email to