diff options
author | Georg Brandl <georg@python.org> | 2007-05-16 13:44:25 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-05-16 13:44:25 +0000 |
commit | 4043a6bbd64a2dc46c20784c1f813b4d38c8c94a (patch) | |
tree | 5751d5bc1858ee536abf27250a7df639cfbda65a | |
parent | 5ece2fb0d1fe921a741dc06c94e976490cf1a7fb (diff) | |
download | cpython-git-4043a6bbd64a2dc46c20784c1f813b4d38c8c94a.tar.gz |
Bug #1719995: don't use deprecated method in sets example.
(backport from rev. 55383)
-rw-r--r-- | Doc/lib/libsets.tex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/lib/libsets.tex b/Doc/lib/libsets.tex index 22bf34bfb4..fbf03c8f9f 100644 --- a/Doc/lib/libsets.tex +++ b/Doc/lib/libsets.tex @@ -187,13 +187,13 @@ backwards compatibility. Programmers should prefer the >>> engineers.add('Marvin') # add element >>> print engineers Set(['Jane', 'Marvin', 'Janice', 'John', 'Jack']) ->>> employees.issuperset(engineers) # superset test +>>> employees.issuperset(engineers) # superset test False ->>> employees.union_update(engineers) # update from another set +>>> employees.update(engineers) # update from another set >>> employees.issuperset(engineers) True >>> for group in [engineers, programmers, managers, employees]: -... group.discard('Susan') # unconditionally remove element +... group.discard('Susan') # unconditionally remove element ... print group ... Set(['Jane', 'Marvin', 'Janice', 'John', 'Jack']) |