summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-23 14:45:02 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-23 14:45:02 (GMT)
commite399d08a4a64674761ccbdb102bc803d1d3b06d0 (patch)
tree47bc9cfb411fb3b8c670c6b09753912a6288d015
parent86c659a32937b7fe991e4f407a2a5f0026bb276d (diff)
downloadcpython-e399d08a4a64674761ccbdb102bc803d1d3b06d0.zip
cpython-e399d08a4a64674761ccbdb102bc803d1d3b06d0.tar.gz
cpython-e399d08a4a64674761ccbdb102bc803d1d3b06d0.tar.bz2
RH pointed out that discard(element) doesn't do the transformation on
the element if necessary. Fixed by calling self.remove(element).
-rw-r--r--Lib/sets.py2
1 files changed, 1 insertions, 1 deletions
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