]> granicus.if.org Git - python/commitdiff
RH pointed out that discard(element) doesn't do the transformation on
authorGuido van Rossum <guido@python.org>
Fri, 23 Aug 2002 14:45:02 +0000 (14:45 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 23 Aug 2002 14:45:02 +0000 (14:45 +0000)
the element if necessary.  Fixed by calling self.remove(element).

Lib/sets.py

index fee06d76be0dc717af24cf33a6fba0d2aa616314..c391545d4e43a7bf7c1a74445e3addcb3b85875f 100644 (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