]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113560: Improve docstrings for set.issubset() and set.issuperset() (GH-113562)
authorCharlie Zhao <zhaoyu_hit@qq.com>
Sat, 27 Jan 2024 09:53:01 +0000 (17:53 +0800)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 09:53:01 +0000 (09:53 +0000)
Objects/setobject.c

index 88d20019bfb4a7fb256d3bdc0d40cf4d26e0b7d4..93de8e84f2ddf99a7ad76cf736e3b52c1d8ae740 100644 (file)
@@ -1770,7 +1770,11 @@ set_issubset(PySetObject *so, PyObject *other)
     Py_RETURN_TRUE;
 }
 
-PyDoc_STRVAR(issubset_doc, "Report whether another set contains this set.");
+PyDoc_STRVAR(issubset_doc,
+"issubset($self, other, /)\n\
+--\n\
+\n\
+Test whether every element in the set is in other.");
 
 static PyObject *
 set_issuperset(PySetObject *so, PyObject *other)
@@ -1802,7 +1806,11 @@ set_issuperset(PySetObject *so, PyObject *other)
     Py_RETURN_TRUE;
 }
 
-PyDoc_STRVAR(issuperset_doc, "Report whether this set contains another set.");
+PyDoc_STRVAR(issuperset_doc,
+"issuperset($self, other, /)\n\
+--\n\
+\n\
+Test whether every element in other is in the set.");
 
 static PyObject *
 set_richcompare(PySetObject *v, PyObject *w, int op)