summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-03 15:09:24 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-02-03 15:09:24 +0100
commit9959414f3f9fc8d2d82a41d8156db640fa5a70a8 (patch)
tree6e767bdd3342dd0c65977e7faab58e62e4b301a7
parent0652bea83533184961d485149551b51cf58f9bdc (diff)
downloadcpython-9959414f3f9fc8d2d82a41d8156db640fa5a70a8.tar.gz
asyncio, Tulip issue 221: Fix doc of QueueEmpty and QueueFull
-rw-r--r--Doc/library/asyncio-sync.rst10
-rw-r--r--Lib/asyncio/queues.py8
2 files changed, 10 insertions, 8 deletions
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
index 4cc9a9645c..80974d9ee1 100644
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -428,13 +428,11 @@ Exceptions
.. exception:: QueueEmpty
- Exception raised when non-blocking :meth:`~Queue.get` (or
- :meth:`~Queue.get_nowait`) is called
- on a :class:`Queue` object which is empty.
+ Exception raised when the :meth:`~Queue.get_nowait` method is called on a
+ :class:`Queue` object which is empty.
.. exception:: QueueFull
- Exception raised when non-blocking :meth:`~Queue.put` (or
- :meth:`~Queue.put_nowait`) is called
- on a :class:`Queue` object which is full.
+ Exception raised when the :meth:`~Queue.put_nowait` method is called on a
+ :class:`Queue` object which is full.
diff --git a/Lib/asyncio/queues.py b/Lib/asyncio/queues.py
index dce0d53c70..4aeb6c4517 100644
--- a/Lib/asyncio/queues.py
+++ b/Lib/asyncio/queues.py
@@ -13,12 +13,16 @@ from .tasks import coroutine
class QueueEmpty(Exception):
- 'Exception raised by Queue.get(block=0)/get_nowait().'
+ """Exception raised when Queue.get_nowait() is called on a Queue object
+ which is empty.
+ """
pass
class QueueFull(Exception):
- 'Exception raised by Queue.put(block=0)/put_nowait().'
+ """Exception raised when the Queue.put_nowait() method is called on a Queue
+ object which is full.
+ """
pass