From 37c4c05a0f89b025ce81e89bf18186cfc4aace7e Mon Sep 17 00:00:00 2001 From: Matt Page Date: Thu, 11 Jan 2024 15:33:09 -0800 Subject: [PATCH] Make docstring for __init__ more closely resemble the original The original version is ``` deque([iterable[, maxlen]]) --> deque object ``` The latter part seems redundant so has been omitted. --- Modules/_collectionsmodule.c | 4 ++-- Modules/clinic/_collectionsmodule.c.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index c0fb4c4ec303e4..fbd45ccc241e7c 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1629,7 +1629,7 @@ deque_richcompare(PyObject *v, PyObject *w, int op) } /*[clinic input] -@text_signature "($self, iterable=None, maxlen=None)" +@text_signature "([iterable[, maxlen]])" _collections.deque.__init__ deque: dequeobject @@ -1642,7 +1642,7 @@ A list-like sequence optimized for data accesses near its endpoints. static int _collections_deque___init___impl(dequeobject *deque, PyObject *iterable, PyObject *maxlen) -/*[clinic end generated code: output=9fbb306da99f6694 input=2966a2a0176e4506]*/ +/*[clinic end generated code: output=9fbb306da99f6694 input=aa6219250dc91d12]*/ { Py_ssize_t maxlenval = -1; diff --git a/Modules/clinic/_collectionsmodule.c.h b/Modules/clinic/_collectionsmodule.c.h index bd2d78eb09fe06..69b87a33e073a8 100644 --- a/Modules/clinic/_collectionsmodule.c.h +++ b/Modules/clinic/_collectionsmodule.c.h @@ -321,7 +321,7 @@ _collections_deque___reduce__(dequeobject *deque, PyObject *Py_UNUSED(ignored)) } PyDoc_STRVAR(_collections_deque___init____doc__, -"deque($self, iterable=None, maxlen=None)\n" +"deque([iterable[, maxlen]])\n" "--\n" "\n" "A list-like sequence optimized for data accesses near its endpoints."); @@ -490,4 +490,4 @@ tuplegetter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=5c65de75bddef4ad input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8f7f860b44810b2c input=a9049054013a1b77]*/