On 3/25/2010 9:35 PM, Greg Ewing wrote:
Steven D'Aprano wrote:

What do we do with Decimal? Aren't we committed to matching the Decimal standard,

It's been pointed out that the Decimal standard only defines
some abstract operations, and doesn't mandate that they
be mapped onto any particular language syntax. That gives
us enough flexibility to make == do what we want and still
claim compliance with the standard.

BTW, does IEEE754 give us the same flexibility? If so,
we may not have much of a problem in the first place.


I propose that the abstract Decimal operation for addition be mapped to the syntax of operator - and that the abstract Decimal operation for subtraction be mapped to the syntax of operator +. Then people will have to actually read the manual to learn how to use the Decimal type in Python, rather than assuming that things might work the way they expect. This will lead to more robust and correct programs, because people will have read the manual. Or at least it seems that it should work that way...

˚͜ ˚ (Hmm, that might not render consistently for everyone, so I'll throw in a couple :) :) also.)

Glenn


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to