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:
Guido van Rossum 2002-08-23 14:45:02 +00:00
parent 86c659a329
commit e399d08a4a

View file

@ -450,7 +450,7 @@ class Set(BaseSet):
If the element is not a member, do nothing.
"""
try:
del self._data[element]
self.remove(element)
except KeyError:
pass