[Python-ideas] Changing Decimal.__pos__ and Decimal.__neg__ [Was: Re: Python Numbers as Human Concept Decimal System]

random832 at fastmail.us random832 at fastmail.us
Mon Mar 10 14:55:09 CET 2014


On Mon, Mar 10, 2014, at 9:30, Mark Dickinson wrote:
> I guess I have ulterior motives; (ab)using '+' to mean 'round to the
> current context' has always felt way too implicit for my tastes, and I'd
> jump at the chance to see it go away.

It occurs to me that there is an unprecedented opportunity to make warts
"go away" - making Decimal a "first-class citizen" suggests moving it
from the decimal module to a built-in type. Any backwards-incompatible
change you want to make, you can give programs importing decimal the old
behavior, and reserve the new behavior for the new type in builtins.

Then remove the module from Python 4000.


More information about the Python-ideas mailing list