python decimals

Terry Reedy tjreedy at udel.edu
Tue Sep 15 23:17:18 CEST 2009


Mark Dickinson wrote:
> On Sep 15, 2:27 am, Andrew Svetlov <andrew.svet... at gmail.com> wrote:
>> Is there some kind of python binding for decNumber library?
>> Standard decimal.Decimal is good enough, but very slow.
>> My current project toughly coupled with 'currency' operations and we
>> have performance problems related to decimal calculations.
>> From my perspective decNumber is fast and has well wide domain to
>> represent and process all required set of numbers - we don't need to
>> work with 'almost infinite numbers' as python decimal can.
>> I tried to google for desired binding - but found nothing.
>> gmpy is interesting project, but supported types is not exactly what
>> we need - rationals and big floats is not decimals in fixed point
>> notation.
>> My team discussed about making own python binding of decNumber - but
>> before we start this task I like to ask python community: is there
>> existing implementation? I don't want to invent the wheel again.

Searching "Python decNumber binding" puts your query, from various 
sources, in several of the top 10 sports ;-) Did not seen anythng in the 
next 20 either.

> As far as I know, no such bindings exist.  There have been various
> efforts to rewrite the decimal module in C, but (again as far as I
> know) none of those efforts have come to fruition yet.




More information about the Python-list mailing list