summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlie Zhao <zhaoyu_hit@qq.com>2024-01-27 09:53:01 (GMT)
committerGitHub <noreply@github.com>2024-01-27 09:53:01 (GMT)
commit11c582235d86b6020710eff282eeb381a7bf7bb7 (patch)
treec085bfe6e4549fa70622f34652fb3f32546e35f5
parent6a8944acb61d0a2c210ab8066cdcec8602110e2f (diff)
downloadcpython-11c582235d86b6020710eff282eeb381a7bf7bb7.zip
cpython-11c582235d86b6020710eff282eeb381a7bf7bb7.tar.gz
cpython-11c582235d86b6020710eff282eeb381a7bf7bb7.tar.bz2
gh-113560: Improve docstrings for set.issubset() and set.issuperset() (GH-113562)
-rw-r--r--Objects/setobject.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 88d2001..93de8e8 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -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)