Wolfgang Maier added the comment:

> We can add a fast Decimal.as_integer_ratio() in C.

That would be a terrific thing to have !! Currently, Decimals perform really 
poorly with the statistics functions and this is entirely due to this 
bottleneck.

With regard to calculating the sum of Decimals in decimal arithmetic, the 
problem is how you'd detect that the input is all Decimals (or contains enough 
Decimals to justify a switch in the algorithm).
The current statistics module, accepts input data consisting of mixed types, 
e.g., you could have Decimal mixed with ints or floats. Much of the complexity 
of the module stems from this fact. You can also read about some of the 
complications under this issue: http://bugs.python.org/issue20481 .

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20499>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to