]> granicus.if.org Git - python/commitdiff
Bug #1719995: don't use deprecated method in sets example.
authorGeorg Brandl <georg@python.org>
Wed, 16 May 2007 13:44:18 +0000 (13:44 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 16 May 2007 13:44:18 +0000 (13:44 +0000)
Doc/lib/libsets.tex

index 69701392b50b9a4333388cdfc66adbb0cf068316..e02a7f52a7f90ed1d48f254bc91a5541b3d00e43 100644 (file)
@@ -189,13 +189,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'])