mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Improve docstring for set.discard() (GH-31315)
This commit is contained in:
parent
6331c08d1c
commit
0ae4019179
1 changed files with 2 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue