Bug #1719995: don't use deprecated method in sets example.

This commit is contained in:
Georg Brandl 2007-05-16 13:44:18 +00:00
parent fa155111b4
commit f1135f30f8
1 changed files with 3 additions and 3 deletions

View 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'])