This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients docs@python, r.david.murray, sbt, zyluo
Date 2013-08-07.22:13:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375913621.79.0.342753932092.issue18676@psf.upfronthosting.co.za>
In-reply-to
Content
> 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).
History
Date User Action Args
2013-08-07 22:13:41sbtsetrecipients: + sbt, r.david.murray, docs@python, zyluo
2013-08-07 22:13:41sbtsetmessageid: <1375913621.79.0.342753932092.issue18676@psf.upfronthosting.co.za>
2013-08-07 22:13:41sbtlinkissue18676 messages
2013-08-07 22:13:41sbtcreate