@@ -478,43 +478,39 @@ \subsubsection{Mutable Sequence Types \label{typesseq-mutable}}
478478\indexii {slice}{assignment}
479479\stindex {del}
480480\withsubitem {(list method)}{
481- \ttindex {append()}
482- \ttindex {extend()}
483- \ttindex {count()}
484- \ttindex {index()}
485- \ttindex {insert()}
486- \ttindex {pop()}
487- \ttindex {remove()}
488- \ttindex {reverse()}
481+ \ttindex {append()}\ttindex {extend()}\ttindex {count()}\ttindex {index()}
482+ \ttindex {insert()}\ttindex {pop()}\ttindex {remove()}\ttindex {reverse()}
489483 \ttindex {sort()}}
490484\noindent
491485Notes:
492486\begin {description }
493- \item [(1)] Raises an exception when \var {x} is not found in \var {s}.
494-
487+ \item [(1)] Raises \exception {ValueError} when \var {x} is not found in
488+ \var {s}.
489+
495490\item [(2)] The \method {sort()} method takes an optional argument
496491 specifying a comparison function of two arguments (list items) which
497- should return \code {-1}, \code {0} or \code {1} depending on whether the
498- first argument is considered smaller than, equal to, or larger than the
499- second argument. Note that this slows the sorting process down
500- considerably; e.g. to sort a list in reverse order it is much faster
501- to use calls to the methods \method {sort()} and \method {reverse()}
502- than to use the built-in function \function {sort()} with a
503- comparison function that reverses the ordering of the elements.
492+ should return \code {-1}, \code {0} or \code {1} depending on whether
493+ the first argument is considered smaller than, equal to, or larger
494+ than the second argument. Note that this slows the sorting process
495+ down considerably; e.g. to sort a list in reverse order it is much
496+ faster to use calls to the methods \method {sort()} and
497+ \method {reverse()} than to use the built-in function
498+ \function {sort()} with a comparison function that reverses the
499+ ordering of the elements.
504500
505501\item [(3)] The \method {sort()} and \method {reverse()} methods modify the
506- list in place for economy of space when sorting or reversing a large
507- list. They don't return the sorted or reversed list to remind you of
508- this side effect.
502+ list in place for economy of space when sorting or reversing a large
503+ list. They don't return the sorted or reversed list to remind you
504+ of this side effect.
509505
510506\item [(4)] The \method {pop()} method is experimental and not supported
511- by other mutable sequence types than lists.
512- The optional argument \var {i} defaults to \code {-1}, so that
513- by default the last item is removed and returned.
507+ by other mutable sequence types than lists. The optional argument
508+ \var {i} defaults to \code {-1}, so that by default the last item is
509+ removed and returned.
514510
515511\item [(5)] Raises an exception when \var {x} is not a list object. The
516- \method {extend()} method is experimental and not supported by mutable types
517- other than lists.
512+ \method {extend()} method is experimental and not supported by
513+ mutable types other than lists.
518514\end {description }
519515
520516
0 commit comments