STINNER Victor <victor.stin...@haypocalc.com> added the comment: 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. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file22533/sleep_negative.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12459> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com