[Python-Dev] Mixing float and Decimal -- thread reboot
Raymond Hettinger
raymond.hettinger at gmail.com
Tue Mar 23 18:01:14 CET 2010
On Mar 23, 2010, at 5:09 AM, Stefan Krah wrote:
>
> I like the simplicity of having a single signal (e.g. CoercionError), but
> a strictness context flag could offer greater control for people who only
> want pure decimal/integer operations.
>
>
> For example:
>
> strictness 0: completely promiscuous behaviour
>
> strictness 1: current py3k behaviour
>
> strictness 2: current py3k behaviour + pure equality comparisons
>
> strictness 3: current py3k behaviour + pure equality comparisons +
> disallow NaN equality comparisons [1]
>
The decimal module is already drowning in complexity,
so it would be best to keep it simple: one boolean flag
that if set would warn about any implicit decimal/float
interaction.
Raymond
More information about the Python-Dev
mailing list