Message333391
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) |
|
Date |
User |
Action |
Args |
2019-01-10 15:58:43 | jdemeyer | set | recipients:
+ jdemeyer |
2019-01-10 15:58:39 | jdemeyer | set | messageid: <1547135919.8.0.0876776516097.issue35707@roundup.psfhosted.org> |
2019-01-10 15:58:39 | jdemeyer | link | issue35707 messages |
2019-01-10 15:58:39 | jdemeyer | create | |
|