Commit ed96e087 authored by Fred Drake's avatar Fred Drake

Fix some nits Guido brought up last August:

- give subsection pages nicer names
- shorten some really long table cells; table cells can't wrap in the
  typeset version of the documentation
parent a70ea213
...@@ -60,7 +60,7 @@ elements must be known when the constructor is called. ...@@ -60,7 +60,7 @@ elements must be known when the constructor is called.
\end{classdesc} \end{classdesc}
\subsection{Set Objects} \subsection{Set Objects \label{set-objects}}
Instances of \class{Set} and \class{ImmutableSet} both provide Instances of \class{Set} and \class{ImmutableSet} both provide
the following operations: the following operations:
...@@ -142,23 +142,21 @@ but not found in \class{ImmutableSet}: ...@@ -142,23 +142,21 @@ but not found in \class{ImmutableSet}:
\hline \hline
\lineii{\var{s}.add(\var{x})} \lineii{\var{s}.add(\var{x})}
{Add element \var{x} to set \var{s}} {add element \var{x} to set \var{s}}
\lineii{\var{s}.remove(\var{x})} \lineii{\var{s}.remove(\var{x})}
{Remove element \var{x} from set \var{s}} {remove \var{x} from set \var{s}}
\lineii{\var{s}.discard(\var{x})} \lineii{\var{s}.discard(\var{x})}
{Removes element \var{x} from set \var{s}. Like \var{s}.remove(\var{x}) {removes \var{x} from set \var{s} if present}
but does not raise KeyError if \var{x} is not in \var{s}}
\lineii{\var{s}.pop()} \lineii{\var{s}.pop()}
{Remove and return an element from \var{s}; no guarantee is {remove and return an arbitrary element from \var{s}}
made about which element is removed}
\lineii{\var{s}.update(\var{t})} \lineii{\var{s}.update(\var{t})}
{Add elements from \var{t} to set \var{s}} {add elements from \var{t} to set \var{s}}
\lineii{\var{s}.clear()} \lineii{\var{s}.clear()}
{Remove all elements from set \var{s}} {remove all elements from set \var{s}}
\end{tableii} \end{tableii}
\subsection{Example} \subsection{Example \label{set-example}}
\begin{verbatim} \begin{verbatim}
>>> from sets import Set >>> from sets import Set
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment