Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 17d87f8

Browse files
committed
asyncio, Tulip issue 221: Fix doc of QueueEmpty and QueueFull
1 parent 3265344 commit 17d87f8

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

Doc/library/asyncio-sync.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,11 @@ Exceptions
428428

429429
.. exception:: QueueEmpty
430430

431-
Exception raised when non-blocking :meth:`~Queue.get` (or
432-
:meth:`~Queue.get_nowait`) is called
433-
on a :class:`Queue` object which is empty.
431+
Exception raised when the :meth:`~Queue.get_nowait` method is called on a
432+
:class:`Queue` object which is empty.
434433

435434

436435
.. exception:: QueueFull
437436

438-
Exception raised when non-blocking :meth:`~Queue.put` (or
439-
:meth:`~Queue.put_nowait`) is called
440-
on a :class:`Queue` object which is full.
437+
Exception raised when the :meth:`~Queue.put_nowait` method is called on a
438+
:class:`Queue` object which is full.

Lib/asyncio/queues.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313

1414

1515
class QueueEmpty(Exception):
16-
'Exception raised by Queue.get(block=0)/get_nowait().'
16+
"""Exception raised when Queue.get_nowait() is called on a Queue object
17+
which is empty.
18+
"""
1719
pass
1820

1921

2022
class QueueFull(Exception):
21-
'Exception raised by Queue.put(block=0)/put_nowait().'
23+
"""Exception raised when the Queue.put_nowait() method is called on a Queue
24+
object which is full.
25+
"""
2226
pass
2327

2428

0 commit comments

Comments
 (0)