Message139558
| Author |
vstinner |
| Recipients |
eckhardt, rhettinger, vstinner |
| Date |
2011年07月01日.09:33:22 |
| SpamBayes Score |
5.724706e-07 |
| Marked as misclassified |
No |
| Message-id |
<1309512802.82.0.767967162611.issue12459@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|