Skip to content

Commit

Permalink
gh-90879: Fix missing parameter for put_nowait() (GH-91514)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0fc3517)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
  • Loading branch information
miss-islington and slateny committed Apr 14, 2022
1 parent 0ab5e83 commit f3f5d4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Doc/library/queue.rst
Expand Up @@ -138,7 +138,7 @@ provide the public methods described below.

.. method:: Queue.put_nowait(item)

Equivalent to ``put(item, False)``.
Equivalent to ``put(item, block=False)``.


.. method:: Queue.get(block=True, timeout=None)
Expand Down Expand Up @@ -249,7 +249,7 @@ SimpleQueue Objects

.. method:: SimpleQueue.put_nowait(item)

Equivalent to ``put(item)``, provided for compatibility with
Equivalent to ``put(item, block=False)``, provided for compatibility with
:meth:`Queue.put_nowait`.


Expand Down
2 changes: 1 addition & 1 deletion Lib/queue.py
Expand Up @@ -298,7 +298,7 @@ def get(self, block=True, timeout=None):
def put_nowait(self, item):
'''Put an item into the queue without blocking.
This is exactly equivalent to `put(item)` and is only provided
This is exactly equivalent to `put(item, block=False)` and is only provided
for compatibility with the Queue class.
'''
return self.put(item, block=False)
Expand Down

0 comments on commit f3f5d4b

Please sign in to comment.