summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-08-25 18:59:04 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-08-25 18:59:04 (GMT)
commit4a2f91e302956ecaa5a70c42b403967e4b261a3d (patch)
tree9769c44c3d2727e8ab1527b55597fe23a0d2592a
parentea76c98014e7f99974e3dcdbe168d45762bf627d (diff)
downloadcpython-4a2f91e302956ecaa5a70c42b403967e4b261a3d.zip
cpython-4a2f91e302956ecaa5a70c42b403967e4b261a3d.tar.gz
cpython-4a2f91e302956ecaa5a70c42b403967e4b261a3d.tar.bz2
Added a clue about why xyz_update isn't the same as __xyz__.
-rw-r--r--Lib/sets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/sets.py b/Lib/sets.py
index 3897fb9..8808701 100644
--- a/Lib/sets.py
+++ b/Lib/sets.py
@@ -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."""