Richard Oudkerk added the comment:

> IMHO it just doesn't make sense passing 0.0 as a timeout value.

I have written lots of code that looks like

    timeout = max(deadline - time.time(), 0)
    some_function(..., timeout=timeout)

This makes perfect sense.  Working code should not be broken -- it is the 
docsting that should be changed.

I can't think of *any* function taking a timeout which rejects a zero timeout.  
See select(), poll(), Condition.wait(), Lock.acquire(), Thread.join().  In each 
case a zero timeout causes a non-blocking call.

Also, note that the implementation does not contradict the docstring or 
documentation: they say nothing about what happens it timeout is zero (or 
negative).

----------
nosy: +sbt

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18676>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to