]> granicus.if.org Git - python/commitdiff
Added a clue about why xyz_update isn't the same as __xyz__.
authorTim Peters <tim.peters@gmail.com>
Sun, 25 Aug 2002 18:59:04 +0000 (18:59 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 25 Aug 2002 18:59:04 +0000 (18:59 +0000)
Lib/sets.py

index 3897fb9d7ccec6ca908f2f207d9738f54905abcb..8808701d24479710c5473a6b4aee618e61c89634 100644 (file)
@@ -361,7 +361,10 @@ class Set(BaseSet):
         # We inherit object.__hash__, so we must deny this explicitly
         raise TypeError, "Can't hash a Set, only an ImmutableSet."
 
-    # In-place union, intersection, differences
+    # In-place union, intersection, differences.
+    # Subtle:  The xyz_update() functions deliberately return None,
+    # as do all mutating operations on built-in container types.
+    # The __xyz__ spellings have to return self, though.
 
     def __ior__(self, other):
         """Update a set with the union of itself and another."""