diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2022-02-13 21:42:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-13 21:42:59 (GMT) |
commit | 0ae40191793da1877a12d512f0116d99301b2c51 (patch) | |
tree | 1856bb402cee8954a16cdb4a3e8175a95e58e2ed /Objects/setobject.c | |
parent | 6331c08d1c3248ff47a7b8e0045c9023c9af672c (diff) | |
download | cpython-0ae40191793da1877a12d512f0116d99301b2c51.zip cpython-0ae40191793da1877a12d512f0116d99301b2c51.tar.gz cpython-0ae40191793da1877a12d512f0116d99301b2c51.tar.bz2 |
Improve docstring for set.discard() (GH-31315)
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index 0dd2840..c65b7d5 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -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)) |