Author jdemeyer
Recipients jdemeyer
Date 2019-01-10.15:58:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547135919.8.0.0876776516097.issue35707@roundup.psfhosted.org>
In-reply-to
Content
This used to work correctly in Python 2:

class Half(object):
    def __float__(self):
        return 0.5
import time
time.sleep(Half())

With Python 3.6, one gets instead

Traceback (most recent call last):
  File "test.py", line 6, in <module>
    time.sleep(Half())
TypeError: an integer is required (got type Half)
History
Date User Action Args
2019-01-10 15:58:43jdemeyersetrecipients: + jdemeyer
2019-01-10 15:58:39jdemeyersetmessageid: <1547135919.8.0.0876776516097.issue35707@roundup.psfhosted.org>
2019-01-10 15:58:39jdemeyerlinkissue35707 messages
2019-01-10 15:58:39jdemeyercreate