Skip to content

Commit 0fc3517

Browse files
authored
pythongh-90879: Fix missing parameter for put_nowait() (pythonGH-91514)
1 parent 13b17e2 commit 0fc3517

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/queue.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ provide the public methods described below.
138138

139139
.. method:: Queue.put_nowait(item)
140140

141-
Equivalent to ``put(item, False)``.
141+
Equivalent to ``put(item, block=False)``.
142142

143143

144144
.. method:: Queue.get(block=True, timeout=None)
@@ -248,7 +248,7 @@ SimpleQueue Objects
248248

249249
.. method:: SimpleQueue.put_nowait(item)
250250

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

254254

Lib/queue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def get(self, block=True, timeout=None):
298298
def put_nowait(self, item):
299299
'''Put an item into the queue without blocking.
300300
301-
This is exactly equivalent to `put(item)` and is only provided
301+
This is exactly equivalent to `put(item, block=False)` and is only provided
302302
for compatibility with the Queue class.
303303
'''
304304
return self.put(item, block=False)

0 commit comments

Comments
 (0)