[issue35707] time.sleep() should support objects with __float__
Jeroen Demeyer
report at bugs.python.org
Sun Jan 13 07:53:44 EST 2019
Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:
> The correct code works for float and int (and maybe decimal.Decimal, I don't recall!)
Not for Decimal! In fact sleep(Decimal("0.99")) is interpreted as sleep(0) because __int__ is used to convert.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35707>
_______________________________________
More information about the Python-bugs-list
mailing list