Message227165
| Author |
casevh |
| Recipients |
belopolsky, casevh, pitrou, rhettinger, skrah |
| Date |
2014年09月20日.17:13:22 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CANerV6=qXN4bJTLMfwZgLu6bKGr6UTHjn=LZE2V8qxhO2ekq1g@mail.gmail.com> |
| In-reply-to |
<1411231492.71.0.0479328543707.issue22444@psf.upfronthosting.co.za> |
| Content |
>> What should Decimal('1e123456')//1 return?
>
> I think Decimal case should be considered separately. Note that unlike float, they are not part of the numerical tower, so PEP 3141 arguments don't apply:
>
>>>> isinstance(1.0, numbers.Real)
> True
>>>> isinstance(decimal.Decimal(1), numbers.Real)
> False
>
I maintain gmpy2 and I've had requests to support the numeric tower.
gmpy2 has integral, rational, real, and complex types so I should be
able to. |
|