Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e399d08

Browse files
committed
RH pointed out that discard(element) doesn't do the transformation on
the element if necessary. Fixed by calling self.remove(element).
1 parent 86c659a commit e399d08

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/sets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def discard(self, element):
450450
If the element is not a member, do nothing.
451451
"""
452452
try:
453-
del self._data[element]
453+
self.remove(element)
454454
except KeyError:
455455
pass
456456

0 commit comments

Comments
 (0)