[Python-Dev] New operations in Decimal

Nick Coghlan ncoghlan at gmail.com
Sat May 12 10:56:12 CEST 2007


Tim Peters wrote:
> [Raymond Hettinger]
>> ...
>> My intention for the module is to be fully compliant with the spec and all of its
>> tests.  Code written in other languages which support the spec should expect
>> to be transferrable to Python and run exactly as they did in the original language.

> I'm with Raymond on this one, especially given the triviality of
> implementing the revised spec's new logical operations.

After thinking about it some more, I'm also supporting maintaining full 
compliance (and withdrawing my suggestion of using a separate subclass 
for the logical operands).

Be maintaining full compliance, it should be possible for a developer to 
prototype an algorithm using Python's decimal module and then use that 
exact same algorithm on any GDS compliant arithmetic logic unit. While 
*Python* has the luxury of other means of doing logical operations, an 
embedded algorithm with only a decimal ALU available may not be so 
fortunate.

Regards,
Nick.

P.S. Spending an hour at work yesterday discussing some of the ways the 
bus architecture of a digital signal processor can affect algorithm 
performance may have had more than a little to do with my change of heart ;)

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-Dev mailing list