]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Bug #1719995: don't use deprecated method in sets example.
authorGeorg Brandl <georg@python.org>
Wed, 16 May 2007 13:44:25 +0000 (13:44 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 16 May 2007 13:44:25 +0000 (13:44 +0000)
 (backport from rev. 55383)

Doc/lib/libsets.tex

index 22bf34bfb4f728bf7397adbbe95f3dbfc0a2acfe..fbf03c8f9f07c5034ec5b7ab60b60fb6cec38d03 100644 (file)
@@ -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'])