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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4