Improve docstring for set.discard() (GH-31315)

This commit is contained in:
Raymond Hettinger 2022-02-13 15:42:59 -06:00 committed by GitHub
parent 6331c08d1c
commit 0ae4019179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1930,7 +1930,8 @@ set_discard(PySetObject *so, PyObject *key)
PyDoc_STRVAR(discard_doc,
"Remove an element from a set if it is a member.\n\
\n\
If the element is not a member, do nothing.");
Unlike set.remove(), the discard() method does not raise\n\
an exception when an element is missing from the set.");
static PyObject *
set_reduce(PySetObject *so, PyObject *Py_UNUSED(ignored))