]> granicus.if.org Git - python/commitdiff
Issue 4922: Incorrect comments for MutableSet.add() and MutableSet.discard().
authorRaymond Hettinger <python@rcn.com>
Tue, 13 Jan 2009 09:08:32 +0000 (09:08 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 13 Jan 2009 09:08:32 +0000 (09:08 +0000)
Needs to be backported to 2.6 and forward ported to 3.0 and 3.1.

Lib/_abcoll.py

index a5fee081df5650d4c6b939c8612cb0e52adc51a4..38b44a58950135d34f4d8f91d8e55975f23866f9 100644 (file)
@@ -249,12 +249,12 @@ class MutableSet(Set):
 
     @abstractmethod
     def add(self, value):
-        """Return True if it was added, False if already there."""
+        """Add an element."""
         raise NotImplementedError
 
     @abstractmethod
     def discard(self, value):
-        """Return True if it was deleted, False if not there."""
+        """Remove an element.  Do not raise an exception if absent."""
         raise NotImplementedError
 
     def remove(self, value):