From 3f9d4eaf8f9d5e00bc59eee3ce6554a0747b78c7 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Tue, 4 Feb 2025 10:27:03 +0000 Subject: [PATCH] Clarify the ``set.is{sub,super}set`` docstrings --- Objects/clinic/setobject.c.h | 6 +++--- Objects/setobject.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Objects/clinic/setobject.c.h b/Objects/clinic/setobject.c.h index bf7e604e4b0a46..7be83bad6509ce 100644 --- a/Objects/clinic/setobject.c.h +++ b/Objects/clinic/setobject.c.h @@ -325,7 +325,7 @@ PyDoc_STRVAR(set_issubset__doc__, "issubset($self, other, /)\n" "--\n" "\n" -"Report whether another set contains this set."); +"Return True if the set is a subset of other."); #define SET_ISSUBSET_METHODDEF \ {"issubset", (PyCFunction)set_issubset, METH_O, set_issubset__doc__}, @@ -349,7 +349,7 @@ PyDoc_STRVAR(set_issuperset__doc__, "issuperset($self, other, /)\n" "--\n" "\n" -"Report whether this set contains another set."); +"Return True if the set is a superset of other."); #define SET_ISSUPERSET_METHODDEF \ {"issuperset", (PyCFunction)set_issuperset, METH_O, set_issuperset__doc__}, @@ -519,4 +519,4 @@ set___sizeof__(PyObject *so, PyObject *Py_UNUSED(ignored)) return return_value; } -/*[clinic end generated code: output=83b7742a762ce465 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5e60090ec210982a input=a9049054013a1b77]*/ diff --git a/Objects/setobject.c b/Objects/setobject.c index 26ab352ca6d989..2a4d61b9529bab 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -2021,12 +2021,12 @@ set.issubset other: object / -Report whether another set contains this set. +Return True if the set is a subset of other. [clinic start generated code]*/ static PyObject * set_issubset_impl(PySetObject *so, PyObject *other) -/*[clinic end generated code: output=b2b59d5f314555ce input=f2a4fd0f2537758b]*/ +/*[clinic end generated code: output=b2b59d5f314555ce input=0c956d86fff5b094]*/ { setentry *entry; Py_ssize_t pos = 0; @@ -2066,12 +2066,12 @@ set.issuperset other: object / -Report whether this set contains another set. +Return True if the set is a superset of other. [clinic start generated code]*/ static PyObject * set_issuperset_impl(PySetObject *so, PyObject *other) -/*[clinic end generated code: output=ecf00ce552c09461 input=5f2e1f262e6e4ccc]*/ +/*[clinic end generated code: output=ecf00ce552c09461 input=c3b6ed4108639318]*/ { if (PyAnySet_Check(other)) { return set_issubset((PySetObject *)other, (PyObject *)so);