[Python-checkins] python/dist/src/Doc/lib libtextwrap.tex,1.2,1.3

gward@users.sourceforge.net gward@users.sourceforge.net
Tue, 02 Jul 2002 14:48:14 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv6283/lib

Modified Files:
	libtextwrap.tex 
Log Message:
Don't list all the keyword args to the TextWrapper constructor in the
classdesc -- just use "..." with prose explaining the correspondence
between keyword args and instance attributes.

Document 'width' along with the other instance attributes.

Describe default values consistently.

Typo fixes.


Index: libtextwrap.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtextwrap.tex,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** libtextwrap.tex	2 Jul 2002 20:37:12 -0000	1.2
--- libtextwrap.tex	2 Jul 2002 21:48:12 -0000	1.3
***************
*** 43,51 ****
  \class{TextWrapper} object.
  
! \begin{classdesc}{TextWrapper}{width, initial_indent, subsequent_indent,
!                                expand_tabs, replace_whitespace,
!                                fix_sentence_endings, break_long_words}
! Each keyword argument to the constructor corresponds to an instance
! attribute, so for example
  \begin{verbatim}
  wrapper = TextWrapper(initial_indent="* ")
--- 43,50 ----
  \class{TextWrapper} object.
  
! \begin{classdesc}{TextWrapper}{...}
! The \class{TextWrapper} constructor accepts a number of optional
! keyword arguments.  Each argument corresponds to one instance attribute,
! so for example
  \begin{verbatim}
  wrapper = TextWrapper(initial_indent="* ")
***************
*** 62,76 ****
  \end{classdesc}
  
  
! The effects of the instance attributes are as follows:
  
  \begin{memberdesc}{expand_tabs}
! If true (the default), then all tab characters in \var{text} will be
! expanded to spaces using the \method{expand_tabs()} method of
  \var{text}.
  \end{memberdesc}
  
  \begin{memberdesc}{replace_whitespace}
! If true (the default), each whitespace character (as defined by
  \var{string.whitespace}) remaining after tab expansion will be replaced
  by a single space.  \note{If \var{expand_tabs} is false and
--- 61,82 ----
  \end{classdesc}
  
+ The \class{TextWrapper} instance attributes (and keyword arguments to
+ the constructor) are as follows:
  
! \begin{memberdesc}{width}
! (default: 70) The maximum length of wrapped lines.  As long as there are
! no individual words in the input text longer than \var{width},
! \class{TextWrapper} guarantees that no output line will be longer than
! \var{width} characters.
! \end{memberdesc}
  
  \begin{memberdesc}{expand_tabs}
! (default: \code{True}) If true, then all tab characters in \var{text}
! will be expanded to spaces using the \method{expand_tabs()} method of
  \var{text}.
  \end{memberdesc}
  
  \begin{memberdesc}{replace_whitespace}
! (default: \code{True}) If true, each whitespace character (as defined by
  \var{string.whitespace}) remaining after tab expansion will be replaced
  by a single space.  \note{If \var{expand_tabs} is false and
***************
*** 98,103 ****
  by one of \character{.},
  \character{!}, or \character{?}, possibly followed by one of
! \character{"} or \character{'}.  One problem with this is algoritm is
! that it is unable to detect the difference between ``Dr.'' in
  \begin{verbatim}
  [...] Dr. Frankenstein's monster [...]
--- 104,110 ----
  by one of \character{.},
  \character{!}, or \character{?}, possibly followed by one of
! \character{"} or \character{'}, followed by a space.  One problem
! with this is algorithm is that it is unable to detect the difference
! between ``Dr.'' in
  \begin{verbatim}
  [...] Dr. Frankenstein's monster [...]
***************
*** 105,109 ****
  and ``Spot.'' in
  \begin{verbatim}
! [...] See Spot.  See Spot run [...]
  \end{verbatim}
  Furthermore, since it relies on \var{string.lowercase} for the
--- 112,116 ----
  and ``Spot.'' in
  \begin{verbatim}
! [...] See Spot. See Spot run [...]
  \end{verbatim}
  Furthermore, since it relies on \var{string.lowercase} for the
***************
*** 113,119 ****
  
  \begin{memberdesc}{break_long_words}
! If true (the default), then words longer than \var{width} will be broken
! in order to ensure that no lines are longer than \var{width}.  If it is
! false, long words will not be broken, and some lines may be longer than
  \var{width}.  (Long words will be put on a line by themselves, in order
  to minimize the amount by which \var{width} is exceeded.)
--- 120,127 ----
  
  \begin{memberdesc}{break_long_words}
! (default: \code{True}) If true, then words longer than
! \var{width} will be broken in order to ensure that no lines are longer
! than \var{width}.  If it is false, long words will not be broken, and
! some lines may be longer than
  \var{width}.  (Long words will be put on a line by themselves, in order
  to minimize the amount by which \var{width} is exceeded.)