@@ -110,6 +110,15 @@ \subsection{Set Objects \label{set-objects}}
110110A set is greater than another set if and only if the first set is a proper
111111superset of the second set (is a superset, but is not equal).
112112
113+ The subset and equality comparisons do not generalize to a complete
114+ ordering function. For example, any two disjoint sets are not equal and
115+ are not subsets of each other, so \emph {none } of the following are true:
116+ \code {\var {a}<\var {b}}, \code {\var {a}==\var {b}}, or \code {\var {a}>\var {b}}.
117+ Accordingly, sets do not implement the \method {__cmp__} method.
118+
119+ Since sets only define partial ordering (subset relationships), the output
120+ of the \method {list.sort()} method is undefined for lists of sets.
121+
113122The following table lists operations available in \class {ImmutableSet}
114123but not found in \class {Set}:
115124
@@ -175,9 +184,9 @@ \subsection{Example \label{set-example}}
175184>>> employees.issuperset(engineers)
176185True
177186>>> for group in [engineers, programmers, management, employees]:
178- group.discard('Susan') # unconditionally remove element
179- print group
180-
187+ ... group.discard('Susan') # unconditionally remove element
188+ ... print group
189+ ...
181190Set(['Jane', 'Marvin', 'Janice', 'John', 'Jack'])
182191Set(['Janice', 'Jack', 'Sam'])
183192Set(['Jane', 'Zack', 'Jack'])
0 commit comments