Justin Fay added the comment:
>From looking at the code for this (note I am not a C programmer so may have
>gotten this wrong) _PyTime_FromObject first checks if the object is a float
>using PyFloat_Check(obj) this is evident as passing nan to time.sleep raises a
>ValueEr
New submission from Justin Fay :
Using python3.6 and calling `time.sleep` with an invalid argument the
`TypeError` raised has the error message "TypeError: an integer is required".
This is not the case as a float or integer is acceptable. Using python 2.7 the
error message given