mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
RH pointed out that discard(element) doesn't do the transformation on
the element if necessary. Fixed by calling self.remove(element).
This commit is contained in:
parent
86c659a329
commit
e399d08a4a
1 changed files with 1 additions and 1 deletions
|
|
@ -450,7 +450,7 @@ class Set(BaseSet):
|
||||||
If the element is not a member, do nothing.
|
If the element is not a member, do nothing.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
del self._data[element]
|
self.remove(element)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue