]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Document the suggested alternative to emtpy() and full().
authorRaymond Hettinger <python@rcn.com>
Fri, 6 Mar 2009 23:28:53 +0000 (23:28 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 6 Mar 2009 23:28:53 +0000 (23:28 +0000)
Lib/queue.py

index 773b680d8c6aa9042798fd924afe38e971d99d4d..7cb297c9167e1c5564ca3d5634cc806c4d910859 100644 (file)
@@ -91,14 +91,22 @@ class Queue:
         return n
 
     def empty(self):
-        """Return True if the queue is empty, False otherwise (not reliable!)."""
+        """Return True if the queue is empty, False otherwise (not reliable!).
+
+        This method is likely to be removed at some point.  Use qsize() instead.
+
+        """
         self.mutex.acquire()
         n = not self._qsize()
         self.mutex.release()
         return n
 
     def full(self):
-        """Return True if the queue is full, False otherwise (not reliable!)."""
+        """Return True if the queue is full, False otherwise (not reliable!).
+
+        This method is likely to be removed at some point.  Use qsize() instead.
+
+        """
         self.mutex.acquire()
         n = 0 < self.maxsize == self._qsize()
         self.mutex.release()