[issue35707] time.sleep() should support objects with __float__
Nick Coghlan
report at bugs.python.org
Sun Jan 13 02:50:30 EST 2019
Nick Coghlan <ncoghlan at gmail.com> added the comment:
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.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35707>
_______________________________________
More information about the Python-bugs-list
mailing list