Message370255
The problem with the roundtrip PyFloat_FromDouble(PyFloat_AsDouble(obj)) is that (in contrary to PyNumber_Index()) it is lossy. Converting Decimal, Fraction, float128 to float before using it in expression can lead to loss of precision.
So such conversion looks to me less useful than operator.index(). |
|
Date |
User |
Action |
Args |
2020-05-28 17:27:56 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, mark.dickinson, zach.ware |
2020-05-28 17:27:56 | serhiy.storchaka | set | messageid: <1590686876.93.0.758851621751.issue40801@roundup.psfhosted.org> |
2020-05-28 17:27:56 | serhiy.storchaka | link | issue40801 messages |
2020-05-28 17:27:56 | serhiy.storchaka | create | |
|