Message139558
I think that time.sleep() should behave as select.select() (issue #11757, commit 3982be773b54) and signal.sigtimedwait(): raise a ValueError if the timeout is negative. A good reason to always raise an error is that floatsleep() has different implementations. Especially, the select() implementation behaves differently depending on the platform: negative timeout raises an error (select.error(22, 'Invalid argument')) or returns immediatly.
Attached patch raises an error if the time length is negative. It avoids the integer overflow in the Windows implementation. |
|
Date |
User |
Action |
Args |
2011-07-01 09:33:22 | vstinner | set | recipients:
+ vstinner, rhettinger, eckhardt |
2011-07-01 09:33:22 | vstinner | set | messageid: <1309512802.82.0.767967162611.issue12459@psf.upfronthosting.co.za> |
2011-07-01 09:33:22 | vstinner | link | issue12459 messages |
2011-07-01 09:33:22 | vstinner | create | |
|