summaryrefslogtreecommitdiffstats
path: root/Modules/_operator.c
diff options
context:
space:
mode:
authorRupert Tombs <rupert.tombs@gmail.com>2021-07-07 13:28:09 (GMT)
committerGitHub <noreply@github.com>2021-07-07 13:28:09 (GMT)
commit6bd3ecfc272b122b55a6adec50dd7a7c868f262f (patch)
treead92100dff9d7506a6499f0e8fb18b74111a3e80 /Modules/_operator.c
parent8363c53369a582ff9ae4e797a80cdce12624a278 (diff)
downloadcpython-6bd3ecfc272b122b55a6adec50dd7a7c868f262f.zip
cpython-6bd3ecfc272b122b55a6adec50dd7a7c868f262f.tar.gz
cpython-6bd3ecfc272b122b55a6adec50dd7a7c868f262f.tar.bz2
bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)
Diffstat (limited to 'Modules/_operator.c')
-rw-r--r--Modules/_operator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_operator.c b/Modules/_operator.c
index d5e092e..f051513 100644
--- a/Modules/_operator.c
+++ b/Modules/_operator.c
@@ -507,12 +507,12 @@ _operator_indexOf_impl(PyObject *module, PyObject *a, PyObject *b)
/*[clinic input]
_operator.countOf = _operator.indexOf
-Return the number of times b occurs in a.
+Return the number of items in a which are, or which equal, b.
[clinic start generated code]*/
static Py_ssize_t
_operator_countOf_impl(PyObject *module, PyObject *a, PyObject *b)
-/*[clinic end generated code: output=9e1623197daf3382 input=0c3a2656add252db]*/
+/*[clinic end generated code: output=9e1623197daf3382 input=93ea57f170f3f0bb]*/
{
return PySequence_Count(a, b);
}