summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-16 00:59:59 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-08-16 00:59:59 (GMT)
commit1954035a471de97c8a69b5478dd63a41cefad9f2 (patch)
treef2aa399e7b1ed4f15ae3641cf0cca95c76b5773c /Lib/test
parent7ceb29e4a51b12b08884bd2b43c6255228bdd5e5 (diff)
downloadcpython-1954035a471de97c8a69b5478dd63a41cefad9f2.zip
cpython-1954035a471de97c8a69b5478dd63a41cefad9f2.tar.gz
cpython-1954035a471de97c8a69b5478dd63a41cefad9f2.tar.bz2
Keep doctests in sync with the docs.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sets.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py
index 5b9c4e0..9051d49 100644
--- a/Lib/test/test_sets.py
+++ b/Lib/test/test_sets.py
@@ -634,10 +634,10 @@ Example from the Library Reference: Doc/lib/libsets.tex
... return Base._repr(self, sorted=True)
>>> engineers = Set(['John', 'Jane', 'Jack', 'Janice'])
>>> programmers = Set(['Jack', 'Sam', 'Susan', 'Janice'])
->>> management = Set(['Jane', 'Jack', 'Susan', 'Zack'])
->>> employees = engineers | programmers | management # union
->>> engineering_management = engineers & programmers # intersection
->>> fulltime_management = management - engineers - programmers # difference
+>>> managers = Set(['Jane', 'Jack', 'Susan', 'Zack'])
+>>> employees = engineers | programmers | managers # union
+>>> engineering_management = engineers & managers # intersection
+>>> fulltime_management = managers - engineers - programmers # difference
>>> engineers.add('Marvin')
>>> print engineers
Set(['Jack', 'Jane', 'Janice', 'John', 'Marvin'])
@@ -646,7 +646,7 @@ False
>>> employees.update(engineers) # update from another set
>>> employees.issuperset(engineers)
True
->>> for group in [engineers, programmers, management, employees]:
+>>> for group in [engineers, programmers, managers, employees]:
... group.discard('Susan') # unconditionally remove element
... print group
...