Behaviour of time.sleep with negative arg

Colin Brown cbrown at metservice.com
Sun Mar 14 01:21:39 CET 2004


Python 2.3.3
Under Windows NT:  Negative Int or Real -> sleeps for a long time
Under Linux: Returns IOError: [Errno 22] Invalid argument

I consider both of these unfriendly results and expected the preferable
silent time.sleep(0) in much the same way that slicing a string beyond the
ends returns an empty string.

Colin Brown
PyNZ






More information about the Python-list mailing list