From e399d08a4a64674761ccbdb102bc803d1d3b06d0 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 23 Aug 2002 14:45:02 +0000 Subject: RH pointed out that discard(element) doesn't do the transformation on the element if necessary. Fixed by calling self.remove(element). --- Lib/sets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sets.py b/Lib/sets.py index fee06d7..c391545 100644 --- a/Lib/sets.py +++ b/Lib/sets.py @@ -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 -- cgit v0.12