gh-90879: Fix missing parameter for put_nowait() (GH-91514) · python/cpython@0fc3517

GitHub

Original file line numberDiff line numberDiff line change@@ -138,7 +138,7 @@ provide the public methods described below.

138138139139.. method:: Queue.put_nowait(item)

140140141- Equivalent to ``put(item, False)``.

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

142142143143144144.. method:: Queue.get(block=True, timeout=None)

@@ -248,7 +248,7 @@ SimpleQueue Objects

248248249249.. method:: SimpleQueue.put_nowait(item)

250250251- Equivalent to ``put(item)``, provided for compatibility with

251+ Equivalent to ``put(item, block=False)``, provided for compatibility with

252252:meth:`Queue.put_nowait`.

253253254254Original file line numberDiff line numberDiff line change@@ -298,7 +298,7 @@ def get(self, block=True, timeout=None):

298298defput_nowait(self, item):

299299'''Put an item into the queue without blocking.

300300301- 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 '''

304304returnself.put(item, block=False)