[Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex,1.38,1.39
akuchling@users.sourceforge.net
akuchling@users.sourceforge.net
Mon, 22 Jul 2002 11:57:38 -0700
Update of /cvsroot/python/python/dist/src/Doc/whatsnew
In directory usw-pr-cvs1:/tmp/cvs-serv28161
Modified Files:
whatsnew23.tex
Log Message:
Sort changed modules into alphabetical order; no other changes
Index: whatsnew23.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** whatsnew23.tex 22 Jul 2002 18:50:11 -0000 1.38
--- whatsnew23.tex 22 Jul 2002 18:57:36 -0000 1.39
***************
*** 689,755 ****
As usual, Python's standard modules had a number of enhancements and
! bug fixes. Here's a partial list; consult the \file{Misc/NEWS} file
! in the source tree, or the CVS logs, for a more complete list.
\begin{itemize}
! \item The new \module{textwrap} module contains functions for wrapping
! strings containing paragraphs of text. The \function{wrap(\var{text},
! \var{width})} function takes a string and returns a list containing
! the text split into lines of no more than the chosen width. The
! \function{fill(\var{text}, \var{width})} function returns a single
! string, reformatted to fit into lines no longer than the chosen width.
! (As you can guess, \function{fill()} is built on top of
! \function{wrap()}. For example:
\begin{verbatim}
! >>> import textwrap
! >>> paragraph = "Not a whit, we defy augury: ... more text ..."
! >>> textwrap.wrap(paragraph, 60)
! ["Not a whit, we defy augury: there's a special providence in",
! "the fall of a sparrow. If it be now, 'tis not to come; if it",
! ...]
! >>> print textwrap.fill(paragraph, 35)
! Not a whit, we defy augury: there's
! a special providence in the fall of
! a sparrow. If it be now, 'tis not
! to come; if it be not to come, it
! will be now; if it be not now, yet
! it will come: the readiness is all.
! >>>
\end{verbatim}
! The module also contains a \class{TextWrapper} class that actually
! implements the text wrapping strategy. Both the
! \class{TextWrapper} class and the \function{wrap()} and
! \function{fill()} functions support a number of additional keyword
! arguments for fine-tuning the formatting; consult the module's
! documentation for details.
! % XXX add a link to the module docs?
! (Contributed by Greg Ward.)
!
! \item Two new functions in the \module{math} module,
! \function{degrees(\var{rads})} and \function{radians(\var{degs})},
! convert between radians and degrees. Other functions in the
! \module{math} module such as
! \function{math.sin()} and \function{math.cos()} have always required
! input values measured in radians. (Contributed by Raymond Hettinger.)
!
! \item Three new functions, \function{getpgid()}, \function{killpg()},
! and \function{mknod()}, were added to the \module{posix} module that
! underlies the \module{os} module. (Contributed by Gustavo Niemeyer
! and Geert Jansen.)
!
! \item The \module{socket} module now supports timeouts. You
! can call the \method{settimeout(\var{t})} method on a socket object to
! set a timeout of \var{t} seconds. Subsequent socket operations that
! take longer than \var{t} seconds to complete will abort and raise a
! \exception{socket.error} exception.
! (The original timeout implementation was by Tim O'Malley. Michael
! Gilfix integrated it into the Python \module{socket} module, after the
! patch had undergone a lengthy review. After it was checked in, Guido
! van~Rossum rewrote parts of it. This is a good example of the free
! software development process.)
\item The \module{getopt} module gained a new function,
--- 689,731 ----
As usual, Python's standard modules had a number of enhancements and
! bug fixes. Here's a partial list of the most notable changes, sorted
! alphabetically by module name. Consult the
! \file{Misc/NEWS} file in the source tree for a more
! complete list of changes, or look through the CVS logs for all the
! details.
\begin{itemize}
! \item The \module{array} module now supports arrays of Unicode
! characters using the \samp{u} format character. Arrays also now
! support using the \code{+=} assignment operator to add another array's
! contents, and the \code{*=} assignment operator to repeat an array.
! (Contributed by Jason Orendorff.)
!
! \item The Distutils \class{Extension} class now supports
! an extra constructor argument named \samp{depends} for listing
! additional source files that an extension depends on. This lets
! Distutils recompile the module if any of the dependency files are
! modified. For example, if \samp{sampmodule.c} includes the header
! file \file{sample.h}, you would create the \class{Extension} object like
! this:
\begin{verbatim}
! ext = Extension("samp",
! sources=["sampmodule.c"],
! depends=["sample.h"])
\end{verbatim}
! Modifying \file{sample.h} would then cause the module to be recompiled.
! (Contributed by Jeremy Hylton.)
! \item Two new binary packagers were added to the Distutils.
! \code{bdist_pkgtool} builds \file{.pkg} files to use with Solaris
! \program{pkgtool}, and \code{bdist_sdux} builds \program{swinstall}
! packages for use on HP-UX.
! An abstract binary packager class,
! \module{distutils.command.bdist_packager}, was added; this may make it
! easier to write binary packaging commands. (Contributed by Mark
! Alexander.)
\item The \module{getopt} module gained a new function,
***************
*** 770,805 ****
(Contributed by Peter \AA{strand}.)
- \item Two new binary packagers were added to the Distutils.
- \code{bdist_pkgtool} builds \file{.pkg} files to use with Solaris
- \program{pkgtool}, and \code{bdist_sdux} builds \program{swinstall}
- packages for use on HP-UX.
- An abstract binary packager class,
- \module{distutils.command.bdist_packager}, was added; this may make it
- easier to write binary packaging commands. (Contributed by Mark
- Alexander.)
-
- \item The Distutils \class{Extension} class now supports
- an extra constructor argument named \samp{depends} for listing
- additional source files that an extension depends on. This lets
- Distutils recompile the module if any of the dependency files are
- modified. For example, if \samp{sampmodule.c} includes the header
- file \file{sample.h}, you would create the \class{Extension} object like
- this:
-
- \begin{verbatim}
- ext = Extension("samp",
- sources=["sampmodule.c"],
- depends=["sample.h"])
- \end{verbatim}
-
- Modifying \file{sample.h} would then cause the module to be recompiled.
- (Contributed by Jeremy Hylton.)
-
- \item The \module{array} module now supports arrays of Unicode
- characters using the \samp{u} format character. Arrays also now
- support using the \code{+=} assignment operator to add another array's
- contents, and the \code{*=} assignment operator to repeat an array.
- (Contributed by Jason Orendorff.)
-
\item The \module{grp}, \module{pwd}, and \module{resource} modules
now return enhanced tuples:
--- 746,749 ----
***************
*** 812,815 ****
--- 756,778 ----
\end{verbatim}
+
+ \item Two new functions in the \module{math} module,
+ \function{degrees(\var{rads})} and \function{radians(\var{degs})},
+ convert between radians and degrees. Other functions in the
+ \module{math} module such as
+ \function{math.sin()} and \function{math.cos()} have always required
+ input values measured in radians. (Contributed by Raymond Hettinger.)
+
+ \item Three new functions, \function{getpgid()}, \function{killpg()},
+ and \function{mknod()}, were added to the \module{posix} module that
+ underlies the \module{os} module. (Contributed by Gustavo Niemeyer
+ and Geert Jansen.)
+
+ \item The parser objects provided by the \module{pyexpat} module
+ can now optionally buffer character data, resulting in fewer calls to
+ your character data handler and therefore faster performance. Setting
+ the parser object's \member{buffer_text} attribute to \constant{True}
+ will enable buffering.
+
\item The \module{readline} module also gained a number of new
functions: \function{get_history_item()},
***************
*** 822,835 ****
unavoidable race conditions.
\item The DOM implementation
in \module{xml.dom.minidom} can now generate XML output in a
particular encoding, by specifying an optional encoding argument to
the \method{toxml()} and \method{toprettyxml()} methods of DOM nodes.
-
- \item The parser objects provided by the \module{pyexpat} module
- can now optionally buffer character data, resulting in fewer calls to
- your character data handler and therefore faster performance. Setting
- the parser object's \member{buffer_text} attribute to \constant{True}
- will enable buffering.
\end{itemize}
--- 785,839 ----
unavoidable race conditions.
+ \item The \module{socket} module now supports timeouts. You
+ can call the \method{settimeout(\var{t})} method on a socket object to
+ set a timeout of \var{t} seconds. Subsequent socket operations that
+ take longer than \var{t} seconds to complete will abort and raise a
+ \exception{socket.error} exception.
+
+ The original timeout implementation was by Tim O'Malley. Michael
+ Gilfix integrated it into the Python \module{socket} module, after the
+ patch had undergone a lengthy review. After it was checked in, Guido
+ van~Rossum rewrote parts of it. This is a good example of the free
+ software development process in action.
+
+ \item The new \module{textwrap} module contains functions for wrapping
+ strings containing paragraphs of text. The \function{wrap(\var{text},
+ \var{width})} function takes a string and returns a list containing
+ the text split into lines of no more than the chosen width. The
+ \function{fill(\var{text}, \var{width})} function returns a single
+ string, reformatted to fit into lines no longer than the chosen width.
+ (As you can guess, \function{fill()} is built on top of
+ \function{wrap()}. For example:
+
+ \begin{verbatim}
+ >>> import textwrap
+ >>> paragraph = "Not a whit, we defy augury: ... more text ..."
+ >>> textwrap.wrap(paragraph, 60)
+ ["Not a whit, we defy augury: there's a special providence in",
+ "the fall of a sparrow. If it be now, 'tis not to come; if it",
+ ...]
+ >>> print textwrap.fill(paragraph, 35)
+ Not a whit, we defy augury: there's
+ a special providence in the fall of
+ a sparrow. If it be now, 'tis not
+ to come; if it be not to come, it
+ will be now; if it be not now, yet
+ it will come: the readiness is all.
+ >>>
+ \end{verbatim}
+
+ The module also contains a \class{TextWrapper} class that actually
+ implements the text wrapping strategy. Both the
+ \class{TextWrapper} class and the \function{wrap()} and
+ \function{fill()} functions support a number of additional keyword
+ arguments for fine-tuning the formatting; consult the module's
+ documentation for details.
+ % XXX add a link to the module docs?
+ (Contributed by Greg Ward.)
+
\item The DOM implementation
in \module{xml.dom.minidom} can now generate XML output in a
particular encoding, by specifying an optional encoding argument to
the \method{toxml()} and \method{toprettyxml()} methods of DOM nodes.
\end{itemize}