On Mon, Mar 10, 2014, at 10:21, Oscar Benjamin wrote:
That's also possible. I wonder what a good name for a new Decimal type would be. It's unfortunate that calling it 'decimal' would sort of conflict with people doing 'import decimal'.
I don't think the conflict is a big deal. You can shadow builtins with globals, and on the off chance that you want to use both, you can import it as a different name. Any module that imports decimal is going to be one that doesn't know or care about the built-in type. To me, the more dicey aspect is what happens if you mix the types - if you pick a type for mixed operations to convert to, then passing in the 'wrong' type will slowly 'infect' that module's data with a type which has behavior subtly different from what it expects. You could disallow mixed operations like it does now for floats, I suppose.