From: Raymond Hettinger Date: Sat, 7 Mar 2009 14:12:00 +0000 (+0000) Subject: Redocument the empty() and full() methods. X-Git-Tag: 3.0~331 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3c01672cee0b909a797648eb2b1b46fdcf4085e;p=thirdparty%2FPython%2Fcpython.git Redocument the empty() and full() methods. --- diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index e90f2766bf6e..689141542ce7 100644 --- a/Doc/library/queue.rst +++ b/Doc/library/queue.rst @@ -78,6 +78,22 @@ provide the public methods described below. guarantee that put() will not block. +.. method:: Queue.empty() + + Return ``True`` if the queue is empty, ``False`` otherwise. If empty() + returns ``True`` it doesn't guarantee that a subsequent call to put() + will not block. Similarly, if empty() returns ``False`` it doesn't + guarantee that a subsequent call to get() will not block. + + +.. method:: Queue.full() + + Return ``True`` if the queue is full, ``False`` otherwise. If full() + returns ``True`` it doesn't guarantee that a subsequent call to get() + will not block. Similarly, if full() returns ``False`` it doesn't + guarantee that a subsequent call to put() will not block. + + .. method:: Queue.put(item[, block[, timeout]]) Put *item* into the queue. If optional args *block* is true and *timeout* is