This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients AVINASH MISHRA, jdemeyer, ncoghlan, remi.lapeyre, vstinner
Date 2019-01-13.07:50:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547365830.29.0.246668563549.issue35707@roundup.psfhosted.org>
In-reply-to
Content
Deriving __int__ from __float__ wouldn't be the right answer, as that can easily lead to unwanted OverflowError exceptions and other issues.

However, Jeroen's suggested order of checking __index__ then __float__ then __int__ in _PyTime_FromObject makes sense to me, as that addresses Victor's desire to use the most precise conversion available.
History
Date User Action Args
2019-01-13 07:50:31ncoghlansetrecipients: + ncoghlan, vstinner, jdemeyer, remi.lapeyre, AVINASH MISHRA
2019-01-13 07:50:30ncoghlansetmessageid: <1547365830.29.0.246668563549.issue35707@roundup.psfhosted.org>
2019-01-13 07:50:30ncoghlanlinkissue35707 messages
2019-01-13 07:50:30ncoghlancreate