[Python-checkins] python/dist/src/Doc/lib libfunctional.tex, NONE, 1.4.2.2 libhashlib.tex, NONE, 1.1.2.2 libreconvert.tex, NONE, 1.1.2.2 libspwd.tex, NONE, 1.2.2.2 libzipimport.tex, NONE, 1.1.6.2 asttable.tex, 1.1.14.1, 1.1.14.2 email.tex, 1.11.2.2, 1.11.2.3 emailutil.tex, 1.6.2.2, 1.6.2.3 lib.tex, 1.202.2.2, 1.202.2.3 libasyncore.tex, 1.13.2.2, 1.13.2.3 libaudioop.tex, 1.20, 1.20.8.1 libbinascii.tex, 1.23, 1.23.8.1 libbsddb.tex, 1.7.2.2, 1.7.2.3 libcgi.tex, 1.36.2.2, 1.36.2.3 libcodecs.tex, 1.10.2.2, 1.10.2.3 libcollections.tex, 1.10.6.1, 1.10.6.2 libcookie.tex, 1.7.8.2, 1.7.8.3 libcsv.tex, 1.4.4.2, 1.4.4.3 libcurses.tex, 1.39.2.2, 1.39.2.3 libdatetime.tex, 1.44.6.2, 1.44.6.3 libdecimal.tex, 1.24.4.1, 1.24.4.2 libdis.tex, 1.37.2.2, 1.37.2.3 libfcntl.tex, 1.29.2.2, 1.29.2.3 libfuncs.tex, 1.109.2.2, 1.109.2.3 libgc.tex, 1.10.2.2, 1.10.2.3 libglob.tex, 1.12.26.1, 1.12.26.2 libgrp.tex, 1.16, 1.16.2.1 libhmac.tex, 1.1, 1.1.14.1 libhttplib.tex, 1.31.2.2, 1.31.2.3 libimaplib.tex, 1.20.2.2, 1.20.2.3 libimghdr.tex, 1.13, 1.13.26.1 libimp.tex, 1.32.2.2, 1.32.2.3 libitertools.tex, 1.7.4.2, 1.7.4.3 liblogging.tex, 1.8.6.2, 1.8.6.3 libmarshal.tex, 1.22.10.1, 1.22.10.2 libmd5.tex, 1.21, 1.21.10.1 libmmap.tex, 1.8.8.1, 1.8.8.2 libnew.tex, 1.9.2.1, 1.9.2.2 libnntplib.tex, 1.27.12.2, 1.27.12.3 liboperator.tex, 1.21.10.2, 1.21.10.3 libos.tex, 1.91.2.2, 1.91.2.3 libossaudiodev.tex, 1.6.4.2, 1.6.4.3 libpoplib.tex, 1.14.8.2, 1.14.8.3 libposixpath.tex, 1.23.2.2, 1.23.2.3 libpwd.tex, 1.14, 1.14.2.1 librandom.tex, 1.30.2.2, 1.30.2.3 libre.tex, 1.84.2.2, 1.84.2.3 libsets.tex, 1.11.6.2, 1.11.6.3 libsha.tex, 1.10.10.1, 1.10.10.2 libshelve.tex, 1.14.26.2, 1.14.26.3 libshlex.tex, 1.12.20.2, 1.12.20.3 libshutil.tex, 1.10.2.2, 1.10.2.3 libsimplexmlrpc.tex, 1.3.8.2, 1.3.8.3 libsite.tex, 1.23.2.2, 1.23.2.3 libsmtplib.tex, 1.22.2.2, 1.22.2.3 libsocket.tex, 1.68.2.2, 1.68.2.3 libsocksvr.tex, 1.14.24.2, 1.14.24.3 libstdtypes.tex, 1.98.2.2, 1.98.2.3 libstdwin.tex, 1.25.10.1, 1.25.10.2 libstringio.tex, 1.6.20.2, 1.6.20.3 libsubprocess.tex, 1.5.2.1, 1.5.2.2 libtarfile.tex, 1.1.6.2, 1.1.6.3 libtempfile.tex, 1.17.8.2, 1.17.8.3 libthread.tex, 1.25.2.2, 1.25.2.3 libthreading.tex, 1.12.2.2, 1.12.2.3 libtokenize.tex, 1.5, 1.5.20.1 libunicodedata.tex, 1.3.24.2, 1.3.24.3 liburllib.tex, 1.43.2.2, 1.43.2.3 liburllib2.tex, 1.6.10.2, 1.6.10.3 liburlparse.tex, 1.20.8.1, 1.20.8.2 libuserdict.tex, 1.21.2.2, 1.21.2.3 libuu.tex, 1.11.18.2, 1.11.18.3 libweakref.tex, 1.17.8.2, 1.17.8.3 libwebbrowser.tex, 1.10, 1.10.18.1 libxmlrpclib.tex, 1.9.2.2, 1.9.2.3 libzlib.tex, 1.27.12.1, 1.27.12.2 tkinter.tex, 1.12.2.2, 1.12.2.3 xmldom.tex, 1.19.8.2, 1.19.8.3

jhylton@users.sourceforge.net jhylton at users.sourceforge.net
Sun Oct 16 07:24:37 CEST 2005


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27718/Doc/lib

Modified Files:
      Tag: ast-branch
	asttable.tex email.tex emailutil.tex lib.tex libasyncore.tex 
	libaudioop.tex libbinascii.tex libbsddb.tex libcgi.tex 
	libcodecs.tex libcollections.tex libcookie.tex libcsv.tex 
	libcurses.tex libdatetime.tex libdecimal.tex libdis.tex 
	libfcntl.tex libfuncs.tex libgc.tex libglob.tex libgrp.tex 
	libhmac.tex libhttplib.tex libimaplib.tex libimghdr.tex 
	libimp.tex libitertools.tex liblogging.tex libmarshal.tex 
	libmd5.tex libmmap.tex libnew.tex libnntplib.tex 
	liboperator.tex libos.tex libossaudiodev.tex libpoplib.tex 
	libposixpath.tex libpwd.tex librandom.tex libre.tex 
	libsets.tex libsha.tex libshelve.tex libshlex.tex 
	libshutil.tex libsimplexmlrpc.tex libsite.tex libsmtplib.tex 
	libsocket.tex libsocksvr.tex libstdtypes.tex libstdwin.tex 
	libstringio.tex libsubprocess.tex libtarfile.tex 
	libtempfile.tex libthread.tex libthreading.tex libtokenize.tex 
	libunicodedata.tex liburllib.tex liburllib2.tex 
	liburlparse.tex libuserdict.tex libuu.tex libweakref.tex 
	libwebbrowser.tex libxmlrpclib.tex libzlib.tex tkinter.tex 
	xmldom.tex 
Added Files:
      Tag: ast-branch
	libfunctional.tex libhashlib.tex libreconvert.tex libspwd.tex 
	libzipimport.tex 
Log Message:
Merge head to branch (for the last time)


--- NEW FILE: libfunctional.tex ---
\section{\module{functional} ---
         Higher order functions and operations on callable objects.}

\declaremodule{standard}{functional}		% standard library, in Python

\moduleauthor{Peter Harris}{scav at blueyonder.co.uk}
\moduleauthor{Raymond Hettinger}{python at rcn.com}
\sectionauthor{Peter Harris}{scav at blueyonder.co.uk}

\modulesynopsis{Higher-order functions and operations on callable objects.}

\versionadded{2.5}

The \module{functional} module is for higher-order functions: functions
that act on or return other functions. In general, any callable object can
be treated as a function for the purposes of this module.


The \module{functional} module defines the following function:

\begin{funcdesc}{partial}{func\optional{,*args}\optional{, **keywords}}
Return a new \class{partial} object which when called will behave like
\var{func} called with the positional arguments \var{args} and keyword
arguments \var{keywords}. If more arguments are supplied to the call, they
are appended to \var{args}. If additional keyword arguments are supplied,
they extend and override \var{keywords}. Roughly equivalent to:
  \begin{verbatim}
        def partial(func, *args, **keywords):
            def newfunc(*fargs, **fkeywords):
                newkeywords = keywords.copy()
                newkeywords.update(fkeywords)
                return func(*(args + fargs), **newkeywords)
            newfunc.func = func
            newfunc.args = args
            newfunc.keywords = keywords
            return newfunc
  \end{verbatim}

The \function{partial} is used for partial function application which
``freezes'' some portion of a function's arguments and/or keywords
resulting in a new object with a simplified signature.  For example,
\function{partial} can be used to create a callable that behaves like
the \function{int} function where the \var{base} argument defaults to
two:
  \begin{verbatim}
        >>> basetwo = partial(int, base=2)
        >>> basetwo.__doc__('Convert base 2 string to an int.')
        >>> basetwo('10010')
        18
  \end{verbatim}
\end{funcdesc}



\subsection{\class{partial} Objects \label{partial-objects}}


\class{partial} objects are callable objects created by \function{partial()}.
They have three read-only attributes:

\begin{memberdesc}[callable]{func}{}
A callable object or function.  Calls to the \class{partial} object will
be forwarded to \member{func} with new arguments and keywords.
\end{memberdesc}

\begin{memberdesc}[tuple]{args}{}
The leftmost positional arguments that will be prepended to the
positional arguments provided to a \class{partial} object call.
\end{memberdesc}

\begin{memberdesc}[dict]{keywords}{}
The keyword arguments that will be supplied when the \class{partial} object
is called.
\end{memberdesc}

\class{partial} objects are like \class{function} objects in that they are
callable, weak referencable, and can have attributes.  There are some
important differences.  For instance, the \member{__name__} and
\member{__doc__} attributes are not created automatically.  Also,
\class{partial} objects defined in classes behave like static methods and
do not transform into bound methods during instance attribute look-up.

--- NEW FILE: libhashlib.tex ---
\section{\module{hashlib} ---
         Secure hashes and message digests}

\declaremodule{builtin}{hashlib}
\modulesynopsis{Secure hash and message digest algorithms.}
\moduleauthor{Gregory P. Smith}{greg at users.sourceforge.net}
\sectionauthor{Gregory P. Smith}{greg at users.sourceforge.net}

\versionadded{2.5}

\index{message digest, MD5}
\index{secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512}

This module implements a common interface to many different secure hash and
message digest algorithms.  Included are the FIPS secure hash algorithms SHA1,
SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA's MD5
algorithm (defined in Internet \rfc{1321}).
The terms secure hash and message digest are interchangable.  Older
algorithms were called message digests.  The modern term is secure hash.

\warning{Some algorithms have known hash collision weaknesses, see the FAQ at the end.}

There is one constructor method named for each type of \dfn{hash}.  All return
a hash object with the same simple interface.
For example: use \function{sha1()} to create a SHA1 hash object.
You can now feed this object with arbitrary strings using the \method{update()}
method.  At any point you can ask it for the \dfn{digest} of the concatenation
of the strings fed to it so far using the \method{digest()} or
\method{hexdigest()} methods.

Constructors for hash algorithms that are always present in this module are
\function{md5()}, \function{sha1()}, \function{sha224()}, \function{sha256()},
\function{sha384()}, and \function{sha512()}.  Additional algorithms may also
be available depending upon the OpenSSL library python uses on your platform.
\index{OpenSSL}

For example, to obtain the digest of the string \code{'Nobody inspects
the spammish repetition'}:

\begin{verbatim}
>>> import hashlib
>>> m = hashlib.md5()
>>> m.update("Nobody inspects")
>>> m.update(" the spammish repetition")
>>> m.digest()
'\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9'
\end{verbatim}

More condensed:

\begin{verbatim}
>>> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest()
'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2'
\end{verbatim}

A generic \function{new()} constructor that takes the string name of the
desired algorithm as its first parameter also exists to allow access to the
above listed hashes as well as any other algorithms that your OpenSSL library
may offer.  The named constructors are much faster than \function{new()} and
should be preferred.

Using \function{new()} with an algorithm provided by OpenSSL:

\begin{verbatim}
>>> h = hashlib.new('ripemd160')
>>> h.update("Nobody inspects the spammish repetition")
>>> h.hexdigest()
'cc4a5ce1b3df48aec5d22d1f16b894a0b894eccc'
\end{verbatim}

The following values are provided as constant attributes of the hash objects
returned by the constructors:

\begin{datadesc}{digest_size}
  The size of the resulting digest in bytes.
\end{datadesc}

A hash object has the following methods:

\begin{methoddesc}[hash]{update}{arg}
Update the hash object with the string \var{arg}.  Repeated calls are
equivalent to a single call with the concatenation of all the
arguments: \code{m.update(a); m.update(b)} is equivalent to
\code{m.update(a+b)}.
\end{methoddesc}

\begin{methoddesc}[hash]{digest}{}
Return the digest of the strings passed to the \method{update()}
method so far.  This is a 16-byte string which may contain
non-\ASCII{} characters, including null bytes.
\end{methoddesc}

\begin{methoddesc}[hash]{hexdigest}{}
Like \method{digest()} except the digest is returned as a string of
double length, containing only hexadecimal digits.  This may 
be used to exchange the value safely in email or other non-binary
environments.
\end{methoddesc}

\begin{methoddesc}[hash]{copy}{}
Return a copy (``clone'') of the hash object.  This can be used to
efficiently compute the digests of strings that share a common initial
substring.
\end{methoddesc}

\begin{seealso}
  \seemodule{hmac}{A module to generate message authentication codes using hashes.}
  \seemodule{base64}{Another way to encode binary hashes for non-binary environments.}
  \seeurl{http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf}
  {The FIPS 180-2 publication on Secure Hash Algorithms.}
  \seeurl{http://www.cryptography.com/cnews/hash.html}
  {Hash Collision FAQ with information on which algorithms have known issues and
   what that means regarding their use.}
\end{seealso}

--- NEW FILE: libreconvert.tex ---
\section{\module{reconvert} ---
         Convert regular expressions from regex to re form}
\declaremodule{standard}{reconvert}
\moduleauthor{Andrew M. Kuchling}{amk at amk.ca}
\sectionauthor{Skip Montanaro}{skip at pobox.com}


\modulesynopsis{Convert regex-, emacs- or sed-style regular expressions
to re-style syntax.}


This module provides a facility to convert regular expressions from the
syntax used by the deprecated \module{regex} module to those used by the
newer \module{re} module.  Because of similarity between the regular
expression syntax of \code{sed(1)} and \code{emacs(1)} and the
\module{regex} module, it is also helpful to convert patterns written for
those tools to \module{re} patterns.

When used as a script, a Python string literal (or any other expression
evaluating to a string) is read from stdin, and the translated expression is
written to stdout as a string literal.  Unless stdout is a tty, no trailing
newline is written to stdout.  This is done so that it can be used with
Emacs \code{C-U M-|} (shell-command-on-region) which filters the region
through the shell command.

\begin{seealso}
  \seetitle{Mastering Regular Expressions}{Book on regular expressions
            by Jeffrey Friedl, published by O'Reilly.  The second 
            edition of the book no longer covers Python at all, 
            but the first edition covered writing good regular expression
            patterns in great detail.}
\end{seealso}

\subsection{Module Contents}
\nodename{Contents of Module reconvert}

The module defines two functions and a handful of constants.

\begin{funcdesc}{convert}{pattern\optional{, syntax=None}}
 Convert a \var{pattern} representing a \module{regex}-stype regular
 expression into a \module{re}-style regular expression.  The optional
 \var{syntax} parameter is a bitwise-or'd set of flags that control what
 constructs are converted.  See below for a description of the various
 constants.
\end{funcdesc}

\begin{funcdesc}{quote}{s\optional{, quote=None}}
 Convert a string object to a quoted string literal.

 This is similar to \function{repr} but will return a "raw" string (r'...'
 or r"...") when the string contains backslashes, instead of doubling all
 backslashes.  The resulting string does not always evaluate to the same
 string as the original; however it will do just the right thing when passed
 into re.compile().

 The optional second argument forces the string quote; it must be a single
 character which is a valid Python string quote.  Note that prior to Python
 2.5 this would not accept triple-quoted string delimiters.
\end{funcdesc}

\begin{datadesc}{RE_NO_BK_PARENS}
 Suppress paren conversion.  This should be omitted when converting
 \code{sed}-style or \code{emacs}-style regular expressions.
\end{datadesc}

\begin{datadesc}{RE_NO_BK_VBAR}
 Suppress vertical bar conversion.  This should be omitted when converting
 \code{sed}-style or \code{emacs}-style regular expressions.
\end{datadesc}

\begin{datadesc}{RE_BK_PLUS_QM}
 Enable conversion of \code{+} and \code{?} characters.  This should be
 added to the \var{syntax} arg of \function{convert} when converting
 \code{sed}-style regular expressions and omitted when converting
 \code{emacs}-style regular expressions.
\end{datadesc}

\begin{datadesc}{RE_NEWLINE_OR}
 When set, newline characters are replaced by \code{|}.
\end{datadesc}

--- NEW FILE: libspwd.tex ---
\section{\module{spwd} ---
         The shadow password database}

\declaremodule{builtin}{spwd}
  \platform{Unix}
\modulesynopsis{The shadow password database (\function{getspnam()} and friends).}
\versionadded{2.5}

This module provides access to the \UNIX{} shadow password database.
It is available on various \UNIX{} versions.

You must have enough privileges to access the shadow password database
(this usually means you have to be root).

Shadow password database entries are reported as a tuple-like object, whose
attributes correspond to the members of the \code{spwd} structure
(Attribute field below, see \code{<shadow.h>}):

\begin{tableiii}{r|l|l}{textrm}{Index}{Attribute}{Meaning}
  \lineiii{0}{\code{sp_nam}}{Login name}
  \lineiii{1}{\code{sp_pwd}}{Encrypted password}
  \lineiii{2}{\code{sp_lstchg}}{Date of last change}
  \lineiii{3}{\code{sp_min}}{Minimal number of days between changes}
  \lineiii{4}{\code{sp_max}}{Maximum number of days between changes}
  \lineiii{5}{\code{sp_warn}}{Number of days before password expires to warn user about it}
  \lineiii{6}{\code{sp_inact}}{Number of days after password expires until account is blocked}
  \lineiii{7}{\code{sp_expire}}{Number of days since 1970-01-01 until account is disabled}
  \lineiii{8}{\code{sp_flag}}{Reserved}
\end{tableiii}

The sp_nam and sp_pwd items are strings, all others are integers.
\exception{KeyError} is raised if the entry asked for cannot be found.

It defines the following items:

\begin{funcdesc}{getspnam}{name}
Return the shadow password database entry for the given user name.
\end{funcdesc}

\begin{funcdesc}{getspall}{}
Return a list of all available shadow password database entries, in arbitrary order.
\end{funcdesc}


\begin{seealso}
  \seemodule{grp}{An interface to the group database, similar to this.}
  \seemodule{pwd}{An interface to the normal password database, similar to this.}
\end{seealso}

--- NEW FILE: libzipimport.tex ---
\section{\module{zipimport} ---
         Import modules from Zip archives}

\declaremodule{standard}{zipimport}
\modulesynopsis{support for importing Python modules from ZIP archives.}
\moduleauthor{Just van Rossum}{just at letterror.com}

\versionadded{2.3}

This module adds the ability to import Python modules (\file{*.py},
\file{*.py[co]}) and packages from ZIP-format archives. It is usually
not needed to use the \module{zipimport} module explicitly; it is
automatically used by the builtin \keyword{import} mechanism for
\code{sys.path} items that are paths to ZIP archives.

Typically, \code{sys.path} is a list of directory names as strings.  This
module also allows an item of \code{sys.path} to be a string naming a ZIP
file archive. The ZIP archive can contain a subdirectory structure to
support package imports, and a path within the archive can be specified to
only import from a subdirectory.  For example, the path
\file{/tmp/example.zip/lib/} would only import from the
\file{lib/} subdirectory within the archive.

Any files may be present in the ZIP archive, but only files \file{.py} and
\file{.py[co]} are available for import.  ZIP import of dynamic modules
(\file{.pyd}, \file{.so}) is disallowed. Note that if an archive only
contains \file{.py} files, Python will not attempt to modify the archive
by adding the corresponding \file{.pyc} or \file{.pyo} file, meaning that
if a ZIP archive doesn't contain \file{.pyc} files, importing may be rather
slow.

Using the built-in \function{reload()} function will
fail if called on a module loaded from a ZIP archive; it is unlikely that
\function{reload()} would be needed, since this would imply that the ZIP
has been altered during runtime.

The available attributes of this module are:

\begin{excdesc}{ZipImporterError}
  Exception raised by zipimporter objects. It's a subclass of
  \exception{ImportError}, so it can be caught as \exception{ImportError},
  too.
\end{excdesc}

\begin{classdesc*}{zipimporter}
  The class for importing ZIP files.  See
  ``\citetitle{zipimporter Objects}'' (section \ref{zipimporter-objects})
  for constructor details.
\end{classdesc*}


\begin{seealso}
  \seetitle[http://www.pkware.com/appnote.html]{PKZIP Application
            Note}{Documentation on the ZIP file format by Phil
            Katz, the creator of the format and algorithms used.}

  \seepep{0273}{Import Modules from Zip Archives}{Written by James C.
          Ahlstrom, who also provided an implementation. Python 2.3
          follows the specification in PEP 273, but uses an
          implementation written by Just van Rossum that uses the import
          hooks described in PEP 302.}

  \seepep{0302}{New Import Hooks}{The PEP to add the import hooks that help
          this module work.}
\end{seealso}


\subsection{zipimporter Objects \label{zipimporter-objects}}

\begin{classdesc}{zipimporter}{archivepath} 
  Create a new zipimporter instance. \var{archivepath} must be a path to
  a zipfile.  \class{ZipImportError} is raised if \var{archivepath} doesn't
  point to a valid ZIP archive.
\end{classdesc}

\begin{methoddesc}{find_module}{fullname\optional{, path}}
  Search for a module specified by \var{fullname}. \var{fullname} must be
  the fully qualified (dotted) module name. It returns the zipimporter
  instance itself if the module was found, or \constant{None} if it wasn't.
  The optional \var{path} argument is ignored---it's there for 
  compatibility with the importer protocol.
\end{methoddesc}

\begin{methoddesc}{get_code}{fullname}
  Return the code object for the specified module. Raise
  \class{ZipImportError} if the module couldn't be found.
\end{methoddesc}

\begin{methoddesc}{get_data}{pathname}
  Return the data associated with \var{pathname}. Raise \exception{IOError}
  if the file wasn't found.
\end{methoddesc}

\begin{methoddesc}{get_source}{fullname}
  Return the source code for the specified module. Raise
  \class{ZipImportError} if the module couldn't be found, return
  \constant{None} if the archive does contain the module, but has
  no source for it.
\end{methoddesc}

\begin{methoddesc}{is_package}{fullname}
  Return True if the module specified by \var{fullname} is a package.
  Raise \class{ZipImportError} if the module couldn't be found.
\end{methoddesc}

\begin{methoddesc}{load_module}{fullname}
  Load the module specified by \var{fullname}. \var{fullname} must be the
  fully qualified (dotted) module name. It returns the imported
  module, or raises \class{ZipImportError} if it wasn't found.
\end{methoddesc}

\subsection{Examples}
\nodename{zipimport Examples}

Here is an example that imports a module from a ZIP archive - note that
the \module{zipimport} module is not explicitly used.

\begin{verbatim}
$ unzip -l /tmp/example.zip
Archive:  /tmp/example.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
     8467  11-26-02 22:30   jwzthreading.py
 --------                   -------
     8467                   1 file
$ ./python
Python 2.3 (#1, Aug 1 2003, 19:54:32) 
>>> import sys
>>> sys.path.insert(0, '/tmp/example.zip')  # Add .zip file to front of path
>>> import jwzthreading
>>> jwzthreading.__file__
'/tmp/example.zip/jwzthreading.py'
\end{verbatim}

Index: asttable.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/asttable.tex,v
retrieving revision 1.1.14.1
retrieving revision 1.1.14.2
diff -u -d -r1.1.14.1 -r1.1.14.2
--- asttable.tex	7 Jan 2005 06:57:04 -0000	1.1.14.1
+++ asttable.tex	16 Oct 2005 05:23:57 -0000	1.1.14.2
@@ -89,6 +89,8 @@
 \lineiii{Ellipsis}{}{}
 \hline 
 
+\lineiii{Expression}{\member{node}}{}
+
 \lineiii{Exec}{\member{expr}}{}
 \lineiii{}{\member{locals}}{}
 \lineiii{}{\member{globals}}{}

Index: email.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/email.tex,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.3
diff -u -d -r1.11.2.2 -r1.11.2.3
--- email.tex	7 Jan 2005 06:57:05 -0000	1.11.2.2
+++ email.tex	16 Oct 2005 05:23:57 -0000	1.11.2.3
@@ -244,7 +244,7 @@
 
 \item The method \method{gettype()} was renamed to \method{get_type()}.
 
-\item The method\method{getmaintype()} was renamed to
+\item The method \method{getmaintype()} was renamed to
       \method{get_main_type()}.
 
 \item The method \method{getsubtype()} was renamed to

Index: emailutil.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/emailutil.tex,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -d -r1.6.2.2 -r1.6.2.3
--- emailutil.tex	7 Jan 2005 06:57:05 -0000	1.6.2.2
+++ emailutil.tex	16 Oct 2005 05:23:57 -0000	1.6.2.3
@@ -103,7 +103,8 @@
 Optional \var{usegmt} is a flag that when \code{True}, outputs a 
 date string with the timezone as an ascii string \code{GMT}, rather
 than a numeric \code{-0000}. This is needed for some protocols (such
-as HTTP). This only applies when \var{localtime} is \code{False}
+as HTTP). This only applies when \var{localtime} is \code{False}.
+\versionadded{2.4}
 \end{funcdesc}
 
 \begin{funcdesc}{make_msgid}{\optional{idstring}}

Index: lib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/lib.tex,v
retrieving revision 1.202.2.2
retrieving revision 1.202.2.3
diff -u -d -r1.202.2.2 -r1.202.2.3
--- lib.tex	7 Jan 2005 06:57:05 -0000	1.202.2.2
+++ lib.tex	16 Oct 2005 05:23:57 -0000	1.202.2.3
@@ -91,7 +91,9 @@
 \input{libmarshal}
 \input{libwarnings}
 \input{libimp}
+\input{libzipimport}
 \input{libpkgutil}
+\input{libmodulefinder}
 \input{libcode}
 \input{libcodeop}
 \input{libpprint}
@@ -106,6 +108,7 @@
 \input{libstrings}              % String Services
 \input{libstring}
 \input{libre}
+\input{libreconvert}
 \input{libstruct}
 \input{libdifflib}
 \input{libfpformat}
@@ -130,6 +133,7 @@
 \input{libarray}
 \input{libsets}
 \input{libitertools}
+\input{libfunctional}
 \input{libcfgparser}
 \input{libfileinput}
 \input{libcalendar}
@@ -191,6 +195,7 @@
 \input{libunix}                 % UNIX Specific Services
 \input{libposix}
 \input{libpwd}
+\input{libspwd}
 \input{libgrp}
 \input{libcrypt}
 \input{libdl}
@@ -298,6 +303,7 @@
 
 \input{libcrypto}               % Cryptographic Services
 \input{libhmac}
+\input{libhashlib}
 \input{libmd5}
 \input{libsha}
 

Index: libasyncore.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libasyncore.tex,v
retrieving revision 1.13.2.2
retrieving revision 1.13.2.3
diff -u -d -r1.13.2.2 -r1.13.2.3
--- libasyncore.tex	7 Jan 2005 06:57:05 -0000	1.13.2.2
+++ libasyncore.tex	16 Oct 2005 05:23:57 -0000	1.13.2.3
@@ -53,12 +53,11 @@
   \function{poll()} call, measured in seconds; the default is 30 seconds.
   The \var{use_poll} parameter, if true, indicates that \function{poll()}
   should be used in preference to \function{select()} (the default is
-  \code{False}).  The \var{map} parameter is a dictionary whose items are
-  the channels to watch.  As channels are closed they are deleted from their
-  map.  If \var{map} is omitted, a global map is used (this map is updated
-  by the default class \method{__init__()} -- make sure you extend, rather
-  than override, \method{__init__()} if you want to retain this behavior).
+  \code{False}).  
 
+  The \var{map} parameter is a dictionary whose items are
+  the channels to watch.  As channels are closed they are deleted from their
+  map.  If \var{map} is omitted, a global map is used.
   Channels (instances of \class{asyncore.dispatcher}, \class{asynchat.async_chat}
   and subclasses thereof) can freely be mixed in the map.
 \end{funcdesc}

Index: libaudioop.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libaudioop.tex,v
retrieving revision 1.20
retrieving revision 1.20.8.1
diff -u -d -r1.20 -r1.20.8.1
--- libaudioop.tex	6 Dec 2001 23:16:09 -0000	1.20
+++ libaudioop.tex	16 Oct 2005 05:23:57 -0000	1.20.8.1
@@ -42,11 +42,6 @@
 has the width specified in \var{width}.
 \end{funcdesc}
 
-\begin{funcdesc}{adpcm32lin}{adpcmfragment, width, state}
-Decode an alternative 3-bit ADPCM code.  See \function{lin2adpcm3()}
-for details.
-\end{funcdesc}
-
 \begin{funcdesc}{avg}{fragment, width}
 Return the average over all samples in the fragment.
 \end{funcdesc}
@@ -122,13 +117,6 @@
 packed 2 4-bit values per byte.
 \end{funcdesc}
 
-\begin{funcdesc}{lin2adpcm3}{fragment, width, state}
-This is an alternative ADPCM coder that uses only 3 bits per sample.
-It is not compatible with the Intel/DVI ADPCM coder and its output is
-not packed (due to laziness on the side of the author).  Its use is
-discouraged.
-\end{funcdesc}
-
 \begin{funcdesc}{lin2ulaw}{fragment, width}
 Convert samples in the audio fragment to u-LAW encoding and return
 this as a Python string.  u-LAW is an audio encoding format whereby

Index: libbinascii.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbinascii.tex,v
retrieving revision 1.23
retrieving revision 1.23.8.1
diff -u -d -r1.23 -r1.23.8.1
--- libbinascii.tex	28 Nov 2001 07:26:15 -0000	1.23
+++ libbinascii.tex	16 Oct 2005 05:23:57 -0000	1.23.8.1
@@ -51,10 +51,13 @@
 Convert binary data to a line(s) of \ASCII{} characters in
 quoted-printable encoding.  The return value is the converted line(s).
 If the optional argument \var{quotetabs} is present and true, all tabs
-and spaces will be encoded.  If the optional argument \var{header} is
+and spaces will be encoded.  
+If the optional argument \var{istext} is present and true,
+newlines are not encoded but trailing whitespace will be encoded.
+If the optional argument \var{header} is
 present and true, spaces will be encoded as underscores per RFC1522.
 If the optional argument \var{header} is present and false, newline
-characters will be encoded as well, otherwise linefeed conversion might
+characters will be encoded as well; otherwise linefeed conversion might
 corrupt the binary data stream.
 \end{funcdesc}
 

Index: libbsddb.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbsddb.tex,v
retrieving revision 1.7.2.2
retrieving revision 1.7.2.3
diff -u -d -r1.7.2.2 -r1.7.2.3
--- libbsddb.tex	7 Jan 2005 06:57:05 -0000	1.7.2.2
+++ libbsddb.tex	16 Oct 2005 05:23:57 -0000	1.7.2.3
@@ -56,7 +56,7 @@
 
 \begin{funcdesc}{btopen}{filename\optional{, flag\optional{,
 mode\optional{, btflags\optional{, cachesize\optional{, maxkeypage\optional{,
-minkeypage\optional{, psize\optional{, lorder}}}}}}}}}
+minkeypage\optional{, pgsize\optional{, lorder}}}}}}}}}
 
 Open the btree format file named \var{filename}.  Files never intended 
 to be preserved on disk may be created by passing \code{None} as the 
@@ -71,7 +71,7 @@
 \end{funcdesc}
 
 \begin{funcdesc}{rnopen}{filename\optional{, flag\optional{, mode\optional{,
-rnflags\optional{, cachesize\optional{, psize\optional{, lorder\optional{,
+rnflags\optional{, cachesize\optional{, pgsize\optional{, lorder\optional{,
 reclen\optional{, bval\optional{, bfname}}}}}}}}}}
 
 Open a DB record format file named \var{filename}.  Files never intended 

Index: libcgi.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgi.tex,v
retrieving revision 1.36.2.2
retrieving revision 1.36.2.3
diff -u -d -r1.36.2.2 -r1.36.2.3
--- libcgi.tex	7 Jan 2005 06:57:05 -0000	1.36.2.2
+++ libcgi.tex	16 Oct 2005 05:23:57 -0000	1.36.2.3
@@ -404,7 +404,7 @@
 \character{\&}, \character{<} and \character{>} in string \var{s} to
 HTML-safe sequences.  Use this if you need to display text that might
 contain such characters in HTML.  If the optional flag \var{quote} is
-true, the double-quote character (\character{"}) is also translated;
+true, the quotation mark character (\character{"}) is also translated;
 this helps for inclusion in an HTML attribute value, as in \code{<A
 HREF="...">}.  If the value to be quoted might include single- or
 double-quote characters, or both, consider using the

Index: libcodecs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcodecs.tex,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -d -r1.10.2.2 -r1.10.2.3
--- libcodecs.tex	7 Jan 2005 06:57:05 -0000	1.10.2.2
+++ libcodecs.tex	16 Oct 2005 05:23:57 -0000	1.10.2.3
@@ -394,7 +394,7 @@
   be extended with \function{register_error()}.
 \end{classdesc}
 
-\begin{methoddesc}{read}{\optional{size\optional{, chars}}}
+\begin{methoddesc}{read}{\optional{size\optional{, chars, \optional{firstline}}}}
   Decodes data from the stream and returns the resulting object.
 
   \var{chars} indicates the number of characters to read from the
@@ -408,12 +408,16 @@
   decode as much as possible.  \var{size} is intended to prevent having
   to decode huge files in one step.
 
+  \var{firstline} indicates that it would be sufficient to only return
+  the first line, if there are decoding errors on later lines.
+
   The method should use a greedy read strategy meaning that it should
   read as much data as is allowed within the definition of the encoding
   and the given size, e.g.  if optional encoding endings or state
   markers are available on the stream, these should be read too.
 
   \versionchanged[\var{chars} argument added]{2.4}
+  \versionchanged[\var{firstline} argument added]{2.4.2}
 \end{methoddesc}
 
 \begin{methoddesc}{readline}{\optional{size\optional{, keepends}}}
@@ -879,7 +883,7 @@
         {all languages (BMP only)}
 
 \lineiii{utf_7}
-        {U7}
+        {U7, unicode-1-1-utf-7}
         {all languages}
 
 \lineiii{utf_8}

Index: libcollections.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcollections.tex,v
retrieving revision 1.10.6.1
retrieving revision 1.10.6.2
diff -u -d -r1.10.6.1 -r1.10.6.2
--- libcollections.tex	7 Jan 2005 06:57:05 -0000	1.10.6.1
+++ libcollections.tex	16 Oct 2005 05:23:57 -0000	1.10.6.2
@@ -64,6 +64,12 @@
    If no elements are present, raises a \exception{IndexError}.   
 \end{methoddesc}
 
+\begin{methoddesc}{remove}{value}
+   Removed the first occurrence of \var{value}.  If not found,
+   raises a \exception{ValueError}.
+   \versionadded{2.5}
+\end{methoddesc}
+
 \begin{methoddesc}{rotate}{n}
    Rotate the deque \var{n} steps to the right.  If \var{n} is
    negative, rotate to the left.  Rotating one step to the right

Index: libcookie.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcookie.tex,v
retrieving revision 1.7.8.2
retrieving revision 1.7.8.3
diff -u -d -r1.7.8.2 -r1.7.8.3
--- libcookie.tex	7 Jan 2005 06:57:05 -0000	1.7.8.2
+++ libcookie.tex	16 Oct 2005 05:23:57 -0000	1.7.8.3
@@ -98,7 +98,9 @@
 Return a string representation suitable to be sent as HTTP headers.
 \var{attrs} and \var{header} are sent to each \class{Morsel}'s
 \method{output()} method. \var{sep} is used to join the headers
-together, and is by default a newline.
+together, and is by default the combination \code{'\e r\e n'} (CRLF).
+\versionchanged[The default separator has been changed from \code{'\e n'}
+to match the cookie specification]{2.5}
 \end{methoddesc}
 
 \begin{methoddesc}[BaseCookie]{js_output}{\optional{attrs}}
@@ -195,32 +197,32 @@
 >>> C["fig"] = "newton"
 >>> C["sugar"] = "wafer"
 >>> print C # generate HTTP headers
-Set-Cookie: sugar=wafer;
-Set-Cookie: fig=newton;
+Set-Cookie: sugar=wafer
+Set-Cookie: fig=newton
 >>> print C.output() # same thing
-Set-Cookie: sugar=wafer;
-Set-Cookie: fig=newton;
+Set-Cookie: sugar=wafer
+Set-Cookie: fig=newton
 >>> C = Cookie.SmartCookie()
 >>> C["rocky"] = "road"
 >>> C["rocky"]["path"] = "/cookie"
 >>> print C.output(header="Cookie:")
-Cookie: rocky=road; Path=/cookie;
+Cookie: rocky=road; Path=/cookie
 >>> print C.output(attrs=[], header="Cookie:")
-Cookie: rocky=road;
+Cookie: rocky=road
 >>> C = Cookie.SmartCookie()
 >>> C.load("chips=ahoy; vienna=finger") # load from a string (HTTP header)
 >>> print C
-Set-Cookie: vienna=finger;
-Set-Cookie: chips=ahoy;
+Set-Cookie: vienna=finger
+Set-Cookie: chips=ahoy
 >>> C = Cookie.SmartCookie()
 >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
 >>> print C
-Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;";
+Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"
 >>> C = Cookie.SmartCookie()
 >>> C["oreo"] = "doublestuff"
 >>> C["oreo"]["path"] = "/"
 >>> print C
-Set-Cookie: oreo=doublestuff; Path=/;
+Set-Cookie: oreo=doublestuff; Path=/
 >>> C = Cookie.SmartCookie()
 >>> C["twix"] = "none for you"
 >>> C["twix"].value
@@ -233,8 +235,8 @@
 >>> C["string"].value
 'seven'
 >>> print C
-Set-Cookie: number=7;
-Set-Cookie: string=seven;
+Set-Cookie: number=7
+Set-Cookie: string=seven
 >>> C = Cookie.SerialCookie()
 >>> C["number"] = 7
 >>> C["string"] = "seven"
@@ -243,8 +245,8 @@
 >>> C["string"].value
 'seven'
 >>> print C
-Set-Cookie: number="I7\012.";
-Set-Cookie: string="S'seven'\012p1\012.";
+Set-Cookie: number="I7\012."
+Set-Cookie: string="S'seven'\012p1\012."
 >>> C = Cookie.SmartCookie()
 >>> C["number"] = 7
 >>> C["string"] = "seven"
@@ -253,6 +255,6 @@
 >>> C["string"].value
 'seven'
 >>> print C
-Set-Cookie: number="I7\012.";
-Set-Cookie: string=seven;
+Set-Cookie: number="I7\012."
+Set-Cookie: string=seven
 \end{verbatim}

Index: libcsv.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcsv.tex,v
retrieving revision 1.4.4.2
retrieving revision 1.4.4.3
diff -u -d -r1.4.4.2 -r1.4.4.3
--- libcsv.tex	7 Jan 2005 06:57:05 -0000	1.4.4.2
+++ libcsv.tex	16 Oct 2005 05:23:57 -0000	1.4.4.3
@@ -50,11 +50,12 @@
 The \module{csv} module defines the following functions:
 
 \begin{funcdesc}{reader}{csvfile\optional{,
-                         dialect=\code{'excel'}\optional{, fmtparam}}}
+                         dialect=\code{'excel'}}\optional{, fmtparam}}
 Return a reader object which will iterate over lines in the given
 {}\var{csvfile}.  \var{csvfile} can be any object which supports the
 iterator protocol and returns a string each time its \method{next}
-method is called.  If \var{csvfile} is a file object, it must be opened with
+method is called - file objects and list objects are both suitable.  
+If \var{csvfile} is a file object, it must be opened with
 the 'b' flag on platforms where that makes a difference.  An optional
 {}\var{dialect} parameter can be given
 which is used to define a set of parameters specific to a particular CSV
@@ -71,7 +72,7 @@
 \end{funcdesc}
 
 \begin{funcdesc}{writer}{csvfile\optional{,
-                         dialect=\code{'excel'}\optional{, fmtparam}}}
+                         dialect=\code{'excel'}}\optional{, fmtparam}}
 Return a writer object responsible for converting the user's data into
 delimited strings on the given file-like object.  \var{csvfile} can be any
 object with a \function{write} method.  If \var{csvfile} is a file object,
@@ -94,9 +95,14 @@
 with \function{str()} before being written.
 \end{funcdesc}
 
-\begin{funcdesc}{register_dialect}{name, dialect}
-Associate \var{dialect} with \var{name}.  \var{dialect} must be a subclass
-of \class{csv.Dialect}.  \var{name} must be a string or Unicode object.
+\begin{funcdesc}{register_dialect}{name\optional{, dialect}\optional{, fmtparam}}
+Associate \var{dialect} with \var{name}.  \var{name} must be a string
+or Unicode object. The dialect can be specified either by passing a
+sub-class of \class{Dialect}, or by \var{fmtparam} keyword arguments,
+or both, with keyword arguments overriding parameters of the dialect.
+For more information about the dialect and formatting parameters, see
+section~\ref{csv-fmt-params}, ``Dialects and Formatting Parameters''
+for details of these parameters.
 \end{funcdesc}
 
 \begin{funcdesc}{unregister_dialect}{name}
@@ -114,6 +120,12 @@
 Return the names of all registered dialects.
 \end{funcdesc}
 
+\begin{funcdesc}{field_size_limit}{\optional{new_limit}}
+  Returns the current maximum field size allowed by the parser. If
+  \var{new_limit} is given, this becomes the new limit.
+  \versionadded{2.5}
+\end{funcdesc}
+
 
 The \module{csv} module defines the following classes:
 
@@ -208,19 +220,25 @@
 
 \begin{datadesc}{QUOTE_MINIMAL}
 Instructs \class{writer} objects to only quote those fields which contain
-the current \var{delimiter} or begin with the current \var{quotechar}.
+special characters such as \var{delimiter}, \var{quotechar} or any of the
+characters in \var{lineterminator}.
 \end{datadesc}
 
 \begin{datadesc}{QUOTE_NONNUMERIC}
-Instructs \class{writer} objects to quote all non-numeric fields.
+Instructs \class{writer} objects to quote all non-numeric
+fields. 
+
+Instructs the reader to convert all non-quoted fields to type \var{float}.
 \end{datadesc}
 
 \begin{datadesc}{QUOTE_NONE}
 Instructs \class{writer} objects to never quote fields.  When the current
 \var{delimiter} occurs in output data it is preceded by the current
-\var{escapechar} character.  When \constant{QUOTE_NONE} is in effect, it
-is an error not to have a single-character \var{escapechar} defined, even if
-no data to be written contains the \var{delimiter} character.
+\var{escapechar} character.  If \var{escapechar} is not set, the writer
+will raise \exception{Error} if any characters that require escaping
+are encountered.
+
+Instructs \class{reader} to perform no special processing of quote characters.
 \end{datadesc}
 
 
@@ -250,32 +268,43 @@
 \end{memberdesc}
 
 \begin{memberdesc}[Dialect]{doublequote}
-Controls how instances of \var{quotechar} appearing inside a field should be
-themselves be quoted.  When \constant{True}, the character is doubled.
-When \constant{False}, the \var{escapechar} must be a one-character string
-which is used as a prefix to the \var{quotechar}.  It defaults to
-\constant{True}.
+Controls how instances of \var{quotechar} appearing inside a field should
+be themselves be quoted.  When \constant{True}, the character is doubled.
+When \constant{False}, the \var{escapechar} is used as a prefix to the
+\var{quotechar}.  It defaults to \constant{True}.
+
+On output, if \var{doublequote} is \constant{False} and no
+\var{escapechar} is set, \exception{Error} is raised if a \var{quotechar}
+is found in a field.
 \end{memberdesc}
 
 \begin{memberdesc}[Dialect]{escapechar}
-A one-character string used to escape the \var{delimiter} if \var{quoting}
-is set to \constant{QUOTE_NONE}.  It defaults to \constant{None}.
+A one-character string used by the writer to escape the \var{delimiter} if
+\var{quoting} is set to \constant{QUOTE_NONE} and the \var{quotechar}
+if \var{doublequote} is \constant{False}. On reading, the \var{escapechar}
+removes any special meaning from the following character. It defaults
+to \constant{None}, which disables escaping.
 \end{memberdesc}
 
 \begin{memberdesc}[Dialect]{lineterminator}
-The string used to terminate lines in the CSV file.  It defaults to
-\code{'\e r\e n'}.
+The string used to terminate lines produced by the \class{writer}.
+It defaults to \code{'\e r\e n'}. 
+
+\note{The \class{reader} is hard-coded to recognise either \code{'\e r'}
+or \code{'\e n'} as end-of-line, and ignores \var{lineterminator}. This
+behavior may change in the future.}
 \end{memberdesc}
 
 \begin{memberdesc}[Dialect]{quotechar}
-A one-character string used to quote elements containing the \var{delimiter}
-or which start with the \var{quotechar}.  It defaults to \code{'"'}.
+A one-character string used to quote fields containing special characters,
+such as the \var{delimiter} or \var{quotechar}, or which contain new-line
+characters.  It defaults to \code{'"'}.
 \end{memberdesc}
 
 \begin{memberdesc}[Dialect]{quoting}
-Controls when quotes should be generated by the writer.  It can take on any
-of the \constant{QUOTE_*} constants (see section~\ref{csv-contents})
-and defaults to \constant{QUOTE_MINIMAL}. 
+Controls when quotes should be generated by the writer and recognised
+by the reader.  It can take on any of the \constant{QUOTE_*} constants
+(see section~\ref{csv-contents}) and defaults to \constant{QUOTE_MINIMAL}.
 \end{memberdesc}
 
 \begin{memberdesc}[Dialect]{skipinitialspace}
@@ -294,6 +323,17 @@
 according to the current dialect.
 \end{methoddesc}
 
+Reader objects have the following public attributes:
+
+\begin{memberdesc}[csv reader]{dialect}
+A read-only description of the dialect in use by the parser.
+\end{memberdesc}
+
+\begin{memberdesc}[csv reader]{line_num}
+ The number of lines read from the source iterator. This is not the same
+ as the number of records returned, as records can span multiple lines.
+\end{memberdesc}
+
 
 \subsection{Writer Objects}
 
@@ -317,10 +357,17 @@
 according to the current dialect.
 \end{methoddesc}
 
+Writer objects have the following public attribute:
+
+\begin{memberdesc}[csv writer]{dialect}
+A read-only description of the dialect in use by the writer.
+\end{memberdesc}
+
+
 
 \subsection{Examples}
 
-The ``Hello, world'' of csv reading is
+The simplest example of reading a CSV file:
 
 \begin{verbatim}
 import csv
@@ -329,20 +376,86 @@
     print row
 \end{verbatim}
 
-To print just the first and last columns of each row try
+Reading a file with an alternate format:
 
 \begin{verbatim}
 import csv
-reader = csv.reader(open("some.csv", "rb"))
+reader = csv.reader(open("passwd", "rb"), delimiter=':', quoting=csv.QUOTE_NONE)
 for row in reader:
-    print row[0], row[-1]
+    print row
 \end{verbatim}
 
-The corresponding simplest possible writing example is
+The corresponding simplest possible writing example is:
 
 \begin{verbatim}
 import csv
 writer = csv.writer(open("some.csv", "wb"))
-for row in someiterable:
-    writer.writerow(row)
+writer.writerows(someiterable)
+\end{verbatim}
+
+Registering a new dialect:
+
+\begin{verbatim}
+import csv
+
+csv.register_dialect('unixpwd', delimiter=':', quoting=csv.QUOTE_NONE)
+
+reader = csv.reader(open("passwd", "rb"), 'unixpwd')
+\end{verbatim}
+
+A slightly more advanced use of the reader - catching and reporting errors:
+
+\begin{verbatim}
+import csv, sys
+filename = "some.csv"
+reader = csv.reader(open(filename, "rb"))
+try:
+    for row in reader:
+        print row
+except csv.Error, e:
+    sys.exit('file %s, line %d: %s' % (filename, reader.line_num, e))
 \end{verbatim}
+
+And while the module doesn't directly support parsing strings, it can
+easily be done:
+
+\begin{verbatim}
+import csv
+print csv.reader(['one,two,three'])[0]
+\end{verbatim}
+
+The \module{csv} module doesn't directly support reading and writing
+Unicode, but it is 8-bit clean save for some problems with \ASCII{} NUL
+characters, so you can write classes that handle the encoding and decoding
+for you as long as you avoid encodings like utf-16 that use NULs.
+
+\begin{verbatim}
+import csv
+
+class UnicodeReader:
+    def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
+        self.reader = csv.reader(f, dialect=dialect, **kwds)
+        self.encoding = encoding
+
+    def next(self):
+        row = self.reader.next()
+        return [unicode(s, self.encoding) for s in row]
+
+    def __iter__(self):
+        return self
+
+class UnicodeWriter:
+    def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
+        self.writer = csv.writer(f, dialect=dialect, **kwds)
+        self.encoding = encoding
+
+    def writerow(self, row):
+        self.writer.writerow([s.encode("utf-8") for s in row])
+
+    def writerows(self, rows):
+        for row in rows:
+            self.writerow(row)
+\end{verbatim}
+
+They should work just like the \class{csv.reader} and \class{csv.writer}
+classes but add an \var{encoding} parameter.

Index: libcurses.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v
retrieving revision 1.39.2.2
retrieving revision 1.39.2.3
diff -u -d -r1.39.2.2 -r1.39.2.3
--- libcurses.tex	7 Jan 2005 06:57:06 -0000	1.39.2.2
+++ libcurses.tex	16 Oct 2005 05:23:57 -0000	1.39.2.3
@@ -161,7 +161,7 @@
 calls, LINES is set to 1; the capabilities clear, cup, cud, cud1,
 cuu1, cuu, vpa are disabled; and the home string is set to the value of cr.
 The effect is that the cursor is confined to the current line, and so
-are screen updates.  This may be used for enabling cgaracter-at-a-time 
+are screen updates.  This may be used for enabling character-at-a-time 
 line editing without touching the rest of the screen.
 \end{funcdesc}
 
@@ -391,7 +391,7 @@
 \begin{funcdesc}{pair_content}{pair_number}
 Returns a tuple \code{(\var{fg}, \var{bg})} containing the colors for
 the requested color pair.  The value of \var{pair_number} must be
-between \code{0} and \code{\constant{COLOR_PAIRS} - 1}.
+between \code{1} and \code{\constant{COLOR_PAIRS} - 1}.
 \end{funcdesc}
 
 \begin{funcdesc}{pair_number}{attr}
@@ -635,8 +635,8 @@
   \lineiii{bs}{Bottom}{\constant{ACS_HLINE}}
   \lineiii{tl}{Upper-left corner}{\constant{ACS_ULCORNER}}
   \lineiii{tr}{Upper-right corner}{\constant{ACS_URCORNER}}
-  \lineiii{bl}{Bottom-left corner}{\constant{ACS_BLCORNER}}
-  \lineiii{br}{Bottom-right corner}{\constant{ACS_BRCORNER}}
+  \lineiii{bl}{Bottom-left corner}{\constant{ACS_LLCORNER}}
+  \lineiii{br}{Bottom-right corner}{\constant{ACS_LRCORNER}}
 \end{tableiii}
 \end{methoddesc}
 

Index: libdatetime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v
retrieving revision 1.44.6.2
retrieving revision 1.44.6.3
diff -u -d -r1.44.6.2 -r1.44.6.3
--- libdatetime.tex	7 Jan 2005 06:57:06 -0000	1.44.6.2
+++ libdatetime.tex	16 Oct 2005 05:23:57 -0000	1.44.6.3
@@ -23,7 +23,7 @@
 time adjustment.  Whether a naive \class{datetime} object represents
 Coordinated Universal Time (UTC), local time, or time in some other
 timezone is purely up to the program, just like it's up to the program
-whether a particular number represents meters, miles, or mass.  Naive
+whether a particular number represents metres, miles, or mass.  Naive
 \class{datetime} objects are easy to understand and to work with, at
 the cost of ignoring some aspects of reality.
 
@@ -624,6 +624,17 @@
   ignored.
   \end{methoddesc}
 
+\begin{methoddesc}{strptime}{date_string, format}
+  Return a \class{datetime} corresponding to \var{date_string}, parsed
+  according to \var{format}.  This is equivalent to
+  \code{datetime(*(time.strptime(date_string,
+  format)[0:6]))}. \exception{ValueError} is raised if the date_string and
+  format can't be parsed by \function{time.strptime()} or if it returns a
+  value which isn't a time tuple.
+
+  \versionadded{2.5}
+\end{methoddesc}
+
 Class attributes:
 
 \begin{memberdesc}{min}

Index: libdecimal.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdecimal.tex,v
retrieving revision 1.24.4.1
retrieving revision 1.24.4.2
diff -u -d -r1.24.4.1 -r1.24.4.2
--- libdecimal.tex	7 Jan 2005 06:57:06 -0000	1.24.4.1
+++ libdecimal.tex	16 Oct 2005 05:23:57 -0000	1.24.4.2
@@ -32,7 +32,7 @@
 For this reason, decimal would be preferred in accounting applications which
 have strict equality invariants.
 
-\item The decimal module incorporates notion of significant places so that
+\item The decimal module incorporates a notion of significant places so that
 \samp{1.30 + 1.20} is \constant{2.50}.  The trailing zero is kept to indicate
 significance.  This is the customary presentation for monetary applications. For
 multiplication, the ``schoolbook'' approach uses all the figures in the
@@ -84,7 +84,7 @@
 \constant{Subnormal}, \constant{Overflow}, and \constant{Underflow}.
 
 For each signal there is a flag and a trap enabler.  When a signal is
-encountered, its flag incremented from zero and, then, if the trap enabler
+encountered, its flag is incremented from zero and, then, if the trap enabler
 is set to one, an exception is raised.  Flags are sticky, so the user
 needs to reset them before monitoring a calculation.
 
@@ -119,7 +119,7 @@
 \end{verbatim}
 
 
-Decimal instances can be constructed from integers, strings or tuples.  To
+Decimal instances can be constructed from integers, strings, or tuples.  To
 create a Decimal from a \class{float}, first convert it to a string.  This
 serves as an explicit reminder of the details of the conversion (including
 representation error).  Decimal numbers include special values such as
@@ -160,7 +160,7 @@
 \end{verbatim}
 
 
-Decimals interact well with much of the rest of python.  Here is a small
+Decimals interact well with much of the rest of Python.  Here is a small
 decimal floating point flying circus:
     
 \begin{verbatim}    
@@ -501,13 +501,15 @@
   arithmetic operations in the context.
 
   The \var{rounding} option is one of:
-      \constant{ROUND_CEILING} (towards \constant{Infinity}),
-      \constant{ROUND_DOWN} (towards zero),
-      \constant{ROUND_FLOOR} (towards \constant{-Infinity}),
-      \constant{ROUND_HALF_DOWN} (towards zero),
-      \constant{ROUND_HALF_EVEN},
-      \constant{ROUND_HALF_UP} (away from zero), or
-      \constant{ROUND_UP} (away from zero).
+  \begin{itemize}
+  \item \constant{ROUND_CEILING} (towards \constant{Infinity}),
+  \item \constant{ROUND_DOWN} (towards zero),
+  \item \constant{ROUND_FLOOR} (towards \constant{-Infinity}),
+  \item \constant{ROUND_HALF_DOWN} (to nearest with ties going towards zero),
+  \item \constant{ROUND_HALF_EVEN} (to nearest with ties going to nearest even integer),
+  \item \constant{ROUND_HALF_UP} (to nearest with ties going away from zero), or
+  \item \constant{ROUND_UP} (away from zero).
+  \end{itemize}
 
   The \var{traps} and \var{flags} fields list any signals to be set.
   Generally, new contexts should only set traps and leave the flags clear.
@@ -525,11 +527,11 @@
 large number of methods for doing arithmetic directly in a given context.
 
 \begin{methoddesc}{clear_flags}{}
-  Sets all of the flags to \constant{0}.
+  Resets all of the flags to \constant{0}.
 \end{methoddesc}  
 
 \begin{methoddesc}{copy}{}
-  Returns a duplicate of the context.
+  Return a duplicate of the context.
 \end{methoddesc}  
 
 \begin{methoddesc}{create_decimal}{num}
@@ -691,7 +693,7 @@
   Return the square root to full precision.
 \end{methoddesc}                    
 
-\begin{methoddesc}{substract}{x, y}
+\begin{methoddesc}{subtract}{x, y}
   Return the difference between \var{x} and \var{y}.
 \end{methoddesc}
  
@@ -741,7 +743,7 @@
 \end{classdesc*}
 
 \begin{classdesc*}{DecimalException}
-    Base class for other signals and is a subclass of
+    Base class for other signals and a subclass of
     \exception{ArithmeticError}.
 \end{classdesc*}
 
@@ -834,6 +836,8 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \subsection{Floating Point Notes \label{decimal-notes}}
 
+\subsubsection{Mitigating round-off error with increased precision}
+
 The use of decimal floating point eliminates decimal representation error
 (making it possible to represent \constant{0.1} exactly); however, some
 operations can still incur round-off error when non-zero digits exceed the
@@ -847,7 +851,7 @@
 
 \begin{verbatim}
 # Examples from Seminumerical Algorithms, Section 4.2.2.
->>> from decimal import *
+>>> from decimal import Decimal, getcontext
 >>> getcontext().prec = 8
 
 >>> u, v, w = Decimal(11111113), Decimal(-11111111), Decimal('7.51111111')
@@ -881,6 +885,7 @@
 Decimal("0.0060000")
 \end{verbatim}
 
+\subsubsection{Special values}
 
 The number system for the \module{decimal} module provides special
 values including \constant{NaN}, \constant{sNaN}, \constant{-Infinity},
@@ -1118,3 +1123,166 @@
     return +s
 
 \end{verbatim}                                             
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Decimal FAQ \label{decimal-faq}}
+
+Q.  It is cumbersome to type \code{decimal.Decimal('1234.5')}.  Is there a way
+to minimize typing when using the interactive interpreter?
+
+A.  Some users abbreviate the constructor to just a single letter:
+
+\begin{verbatim}
+>>> D = decimal.Decimal
+>>> D('1.23') + D('3.45')
+Decimal("4.68")
+\end{verbatim}
+
+
+Q.  In a fixed-point application with two decimal places, some inputs
+have many places and need to be rounded.  Others are not supposed to have
+excess digits and need to be validated.  What methods should be used?
+
+A.  The \method{quantize()} method rounds to a fixed number of decimal places.
+If the \constant{Inexact} trap is set, it is also useful for validation:
+
+\begin{verbatim}
+>>> TWOPLACES = Decimal(10) ** -2       # same as Decimal('0.01')
+
+>>> # Round to two places
+>>> Decimal("3.214").quantize(TWOPLACES)
+Decimal("3.21")
+
+>>> # Validate that a number does not exceed two places 
+>>> Decimal("3.21").quantize(TWOPLACES, context=Context(traps=[Inexact]))
+Decimal("3.21")
+
+>>> Decimal("3.214").quantize(TWOPLACES, context=Context(traps=[Inexact]))
+Traceback (most recent call last):
+   ...
+Inexact: Changed in rounding
+\end{verbatim}
+
+
+Q.  Once I have valid two place inputs, how do I maintain that invariant
+throughout an application?
+
+A.  Some operations like addition and subtraction automatically preserve fixed
+point.  Others, like multiplication and division, change the number of decimal
+places and need to be followed-up with a \method{quantize()} step.
+
+
+Q.  There are many ways to express the same value.  The numbers
+\constant{200}, \constant{200.000}, \constant{2E2}, and \constant{.02E+4} all
+have the same value at various precisions. Is there a way to transform them to
+a single recognizable canonical value?
+
+A.  The \method{normalize()} method maps all equivalent values to a single
+representive:
+
+\begin{verbatim}
+>>> values = map(Decimal, '200 200.000 2E2 .02E+4'.split())
+>>> [v.normalize() for v in values]
+[Decimal("2E+2"), Decimal("2E+2"), Decimal("2E+2"), Decimal("2E+2")]
+\end{verbatim}
+
+
+Q.  Some decimal values always print with exponential notation.  Is there
+a way to get a non-exponential representation?
+
+A.  For some values, exponential notation is the only way to express
+the number of significant places in the coefficient.  For example,
+expressing \constant{5.0E+3} as \constant{5000} keeps the value
+constant but cannot show the original's two-place significance.
+
+
+Q.  Is there a way to convert a regular float to a \class{Decimal}?
+
+A.  Yes, all binary floating point numbers can be exactly expressed as a
+Decimal.  An exact conversion may take more precision than intuition would
+suggest, so trapping \constant{Inexact} will signal a need for more precision:
+
+\begin{verbatim}
+def floatToDecimal(f):
+    "Convert a floating point number to a Decimal with no loss of information"
+    # Transform (exactly) a float to a mantissa (0.5 <= abs(m) < 1.0) and an
+    # exponent.  Double the mantissa until it is an integer.  Use the integer
+    # mantissa and exponent to compute an equivalent Decimal.  If this cannot
+    # be done exactly, then retry with more precision.
+
+    mantissa, exponent = math.frexp(f)
+    while mantissa != int(mantissa):
+        mantissa *= 2.0
+        exponent -= 1
+    mantissa = int(mantissa)
+
+    oldcontext = getcontext()
+    setcontext(Context(traps=[Inexact]))
+    try:
+        while True:
+            try:
+               return mantissa * Decimal(2) ** exponent
+            except Inexact:
+                getcontext().prec += 1
+    finally:
+        setcontext(oldcontext)
+\end{verbatim}
+
+
+Q.  Why isn't the \function{floatToDecimal()} routine included in the module?
+
+A.  There is some question about whether it is advisable to mix binary and
+decimal floating point.  Also, its use requires some care to avoid the
+representation issues associated with binary floating point:
+
+\begin{verbatim}
+>>> floatToDecimal(1.1)
+Decimal("1.100000000000000088817841970012523233890533447265625")
+\end{verbatim}
+
+
+Q.  Within a complex calculation, how can I make sure that I haven't gotten a
+spurious result because of insufficient precision or rounding anomalies.
+
+A.  The decimal module makes it easy to test results.  A best practice is to
+re-run calculations using greater precision and with various rounding modes.
+Widely differing results indicate insufficient precision, rounding mode
+issues, ill-conditioned inputs, or a numerically unstable algorithm.
+
+
+Q.  I noticed that context precision is applied to the results of operations
+but not to the inputs.  Is there anything to watch out for when mixing
+values of different precisions?
+
+A.  Yes.  The principle is that all values are considered to be exact and so
+is the arithmetic on those values.  Only the results are rounded.  The
+advantage for inputs is that ``what you type is what you get''.  A
+disadvantage is that the results can look odd if you forget that the inputs
+haven't been rounded:
+
+\begin{verbatim}
+>>> getcontext().prec = 3
+>>> Decimal('3.104') + D('2.104')
+Decimal("5.21")
+>>> Decimal('3.104') + D('0.000') + D('2.104')
+Decimal("5.20")
+\end{verbatim}
+
+The solution is either to increase precision or to force rounding of inputs
+using the unary plus operation:
+
+\begin{verbatim}
+>>> getcontext().prec = 3
+>>> +Decimal('1.23456789')      # unary plus triggers rounding
+Decimal("1.23")
+\end{verbatim}
+
+Alternatively, inputs can be rounded upon creation using the
+\method{Context.create_decimal()} method:
+
+\begin{verbatim}
+>>> Context(prec=5, rounding=ROUND_DOWN).create_decimal('1.2345678')
+Decimal("1.2345")
+\end{verbatim}

Index: libdis.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdis.tex,v
retrieving revision 1.37.2.2
retrieving revision 1.37.2.3
diff -u -d -r1.37.2.2 -r1.37.2.3
--- libdis.tex	7 Jan 2005 06:57:22 -0000	1.37.2.2
+++ libdis.tex	16 Oct 2005 05:23:57 -0000	1.37.2.3
@@ -26,9 +26,7 @@
   2           0 LOAD_GLOBAL              0 (len)
               3 LOAD_FAST                0 (alist)
               6 CALL_FUNCTION            1
-              9 RETURN_VALUE        
-             10 LOAD_CONST               0 (None)
-             13 RETURN_VALUE
+              9 RETURN_VALUE
 \end{verbatim}
 
 (The ``2'' is a line number).
@@ -126,6 +124,10 @@
 Indicates end-of-code to the compiler, not used by the interpreter.
 \end{opcodedesc}
 
+\begin{opcodedesc}{NOP}{}
+Do nothing code.  Used as a placeholder by the bytecode optimizer.
+\end{opcodedesc}
+
 \begin{opcodedesc}{POP_TOP}{}
 Removes the top-of-stack (TOS) item.
 \end{opcodedesc}
@@ -396,6 +398,10 @@
 instruction).
 \end{opcodedesc}
 
+\begin{opcodedesc}{LIST_APPEND}{}
+Calls \code{list.append(TOS1, TOS)}.  Used to implement list comprehensions.
+\end{opcodedesc}
+
 \begin{opcodedesc}{LOAD_LOCALS}{}
 Pushes a reference to the locals of the current scope on the stack.
 This is used in the code for a class definition: After the class body

Index: libfcntl.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfcntl.tex,v
retrieving revision 1.29.2.2
retrieving revision 1.29.2.3
diff -u -d -r1.29.2.2 -r1.29.2.3
--- libfcntl.tex	7 Jan 2005 06:57:23 -0000	1.29.2.2
+++ libfcntl.tex	16 Oct 2005 05:23:57 -0000	1.29.2.3
@@ -66,8 +66,9 @@
   
   If it is false, the buffer's mutability is ignored and behaviour is
   as for a read-only buffer, except that the 1024 byte limit mentioned
-  above is avoided -- so long as the buffer you pass is longer than
-  what the operating system wants to put there, things should work.
+  above is avoided -- so long as the buffer you pass is as least as
+  long as what the operating system wants to put there, things should
+  work.
   
   If \var{mutate_flag} is true, then the buffer is (in effect) passed
   to the underlying \function{ioctl()} system call, the latter's
@@ -165,9 +166,9 @@
 better.
 
 \begin{seealso}
-  \seemodule{os}{The \function{os.open()} function supports locking flags
-                 and is available on a wider variety of platforms than
-                 the \function{lockf()} and \function{flock()}
-                 functions, providing a more platform-independent file
-                 locking facility.}
+  \seemodule{os}{If the locking flags \constant{O_SHLOCK} and
+		 \constant{O_EXLOCK} are present in the \module{os} module,
+  		 the \function{os.open()} function provides a more
+  		 platform-independent alternative to the \function{lockf()}
+  		 and \function{flock()} functions.}
 \end{seealso}

Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.109.2.2
retrieving revision 1.109.2.3
diff -u -d -r1.109.2.2 -r1.109.2.3
--- libfuncs.tex	7 Jan 2005 06:57:23 -0000	1.109.2.2
+++ libfuncs.tex	16 Oct 2005 05:23:57 -0000	1.109.2.3
@@ -60,6 +60,32 @@
   complex number, its magnitude is returned.
 \end{funcdesc}
 
+\begin{funcdesc}{all}{iterable}
+  Return True if all elements of the \var{iterable} are true.
+  Equivalent to:
+  \begin{verbatim}
+     def all(iterable):
+         for element in iterable:
+             if not element:
+                 return False
+         return True
+  \end{verbatim}
+  \versionadded{2.5}
+\end{funcdesc}
+
+\begin{funcdesc}{any}{iterable}
+  Return True if any element of the \var{iterable} is true.
+  Equivalent to:
+  \begin{verbatim}
+     def any(iterable):
+         for element in iterable:
+             if element:
+                 return True
+         return False
+  \end{verbatim}
+  \versionadded{2.5}
+\end{funcdesc}
+
 \begin{funcdesc}{basestring}{}
   This abstract type is the superclass for \class{str} and \class{unicode}.
   It cannot be called or instantiated, but it can be used to test whether
@@ -271,7 +297,7 @@
   consisting of their quotient and remainder when using long division.  With
   mixed operand types, the rules for binary arithmetic operators apply.  For
   plain and long integers, the result is the same as
-  \code{(\var{a} / \var{b}, \var{a} \%{} \var{b})}.
+  \code{(\var{a} // \var{b}, \var{a} \%{} \var{b})}.
   For floating point numbers the result is \code{(\var{q}, \var{a} \%{}
   \var{b})}, where \var{q} is usually \code{math.floor(\var{a} /
   \var{b})} but may be 1 less than that.  In any case \code{\var{q} *
@@ -416,9 +442,12 @@
     after any I/O has been performed, and there's no reliable way to
     determine whether this is the case.}
 
-  The \function{file()} constructor is new in Python 2.2.  The previous
-  spelling, \function{open()}, is retained for compatibility, and is an
-  alias for \function{file()}.
+  The \function{file()} constructor is new in Python 2.2 and is an
+  alias for \function{open()}.  Both spellings are equivalent.  The
+  intent is for \function{open()} to continue to be preferred for use
+  as a factory function which returns a new \class{file} object.  The
+  spelling, \class{file} is more suited to type testing (for example,
+  writing \samp{isinstance(f, file)}).
 \end{funcdesc}
 
 \begin{funcdesc}{filter}{function, list}
@@ -654,7 +683,7 @@
   \versionchanged[Added support for the optional \var{key} argument]{2.5}
 \end{funcdesc}
 
-\begin{funcdesc}{min}{s\optional{, args...}}
+\begin{funcdesc}{min}{s\optional{, args...}\optional{key}}
   With a single argument \var{s}, return the smallest item of a
   non-empty sequence (such as a string, tuple or list).  With more
   than one argument, return the smallest of the arguments.
@@ -687,11 +716,16 @@
 \end{funcdesc}
 
 \begin{funcdesc}{ord}{c}
-  Return the \ASCII{} value of a string of one character or a Unicode
-  character.  E.g., \code{ord('a')} returns the integer \code{97},
+  Given a string of length one, return an integer representing the
+  Unicode code point of the character when the argument is a unicode object,
+  or the value of the byte when the argument is an 8-bit string.
+  For example, \code{ord('a')} returns the integer \code{97},
   \code{ord(u'\e u2020')} returns \code{8224}.  This is the inverse of
-  \function{chr()} for strings and of \function{unichr()} for Unicode
-  characters.
+  \function{chr()} for 8-bit strings and of \function{unichr()} for unicode
+  objects.  If a unicode argument is given and Python was built with
+  UCS2 Unicode, then the character's code point must be in the range
+  [0..65535] inclusive; otherwise the string length is two, and a
+  \exception{TypeError} will be raised.
 \end{funcdesc}
 
 \begin{funcdesc}{pow}{x, y\optional{, z}}
@@ -726,6 +760,7 @@
 
 \begin{verbatim}
 class C(object):
+    def __init__(self): self.__x = None
     def getx(self): return self.__x
     def setx(self, value): self.__x = value
     def delx(self): del self.__x
@@ -745,7 +780,7 @@
   \var{start} + 2 * \var{step}, \ldots]}.  If \var{step} is positive,
   the last element is the largest \code{\var{start} + \var{i} *
   \var{step}} less than \var{stop}; if \var{step} is negative, the last
-  element is the largest \code{\var{start} + \var{i} * \var{step}}
+  element is the smallest \code{\var{start} + \var{i} * \var{step}}
   greater than \var{stop}.  \var{step} must not be zero (or else
   \exception{ValueError} is raised).  Example:
 
@@ -1022,33 +1057,38 @@
 
 \begin{funcdesc}{type}{object}
   Return the type of an \var{object}.  The return value is a
-  type\obindex{type} object.  The standard module
-  \module{types}\refstmodindex{types} defines names for all built-in
-  types that don't already have built-in names.
-  For instance:
+  type\obindex{type} object.  The \function{isinstance()} built-in
+  function is recommended for testing the type of an object.
+
+  With three arguments, \function{type} functions as a constructor
+  as detailed below.
+\end{funcdesc}
+
+\begin{funcdesc}{type}{name, bases, dict}
+  Return a new type object.  This is essentially a dynamic form of the
+  \keyword{class} statement. The \var{name} string is the class name
+  and becomes the \member{__name__} attribute; the \var{bases} tuple
+  itemizes the base classes and becomes the \member{__bases__}
+  attribute; and the \var{dict} dictionary is the namespace containing
+  definitions for class body and becomes the \member{__dict__}
+  attribute.  For example, the following two statements create
+  identical \class{type} objects:
 
 \begin{verbatim}
->>> import types
->>> x = 'abc'
->>> if type(x) is str: print "It's a string"
-...
-It's a string
->>> def f(): pass
-...
->>> if type(f) is types.FunctionType: print "It's a function"
-...
-It's a function
+  >>> class X(object):
+  ...     a = 1
+  ...     
+  >>> X = type('X', (object,), dict(a=1))
 \end{verbatim}
-
-  The \function{isinstance()} built-in function is recommended for
-  testing the type of an object.
+\versionadded{2.2}          
 \end{funcdesc}
 
 \begin{funcdesc}{unichr}{i}
   Return the Unicode string of one character whose Unicode code is the
   integer \var{i}.  For example, \code{unichr(97)} returns the string
   \code{u'a'}.  This is the inverse of \function{ord()} for Unicode
-  strings.  The argument must be in the range [0..65535], inclusive.
+  strings.  The valid range for the argument depends how Python was
+  configured -- it may be either UCS2 [0..0xFFFF] or UCS4 [0..0x10FFFF].
   \exception{ValueError} is raised otherwise.
   \versionadded{2.0}
 \end{funcdesc}
@@ -1118,12 +1158,12 @@
         that the number of elements fit in a native C long.}
 \end{funcdesc}
 
-\begin{funcdesc}{zip}{\optional{seq1, \moreargs}}
+\begin{funcdesc}{zip}{\optional{iterable, \moreargs}}
   This function returns a list of tuples, where the \var{i}-th tuple contains
-  the \var{i}-th element from each of the argument sequences.
+  the \var{i}-th element from each of the argument sequences or iterables.
   The returned list is truncated in length to the length of
-  the shortest argument sequence.  When there are multiple argument
-  sequences which are all of the same length, \function{zip()} is
+  the shortest argument sequence.  When there are multiple arguments
+  which are all of the same length, \function{zip()} is
   similar to \function{map()} with an initial argument of \code{None}.
   With a single sequence argument, it returns a list of 1-tuples.
   With no arguments, it returns an empty list.
@@ -1142,7 +1182,7 @@
 
 There are several built-in functions that are no longer essential to learn,
 know or use in modern Python programming.  They have been kept here to
-maintain backwards compatability with programs written for older versions
+maintain backwards compatibility with programs written for older versions
 of Python.
 
 Python programmers, trainers, students and bookwriters should feel free to

Index: libgc.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgc.tex,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -d -r1.10.2.2 -r1.10.2.3
--- libgc.tex	7 Jan 2005 06:57:23 -0000	1.10.2.2
+++ libgc.tex	16 Oct 2005 05:23:57 -0000	1.10.2.3
@@ -6,11 +6,6 @@
 \moduleauthor{Neil Schemenauer}{nas at arctrix.com}
 \sectionauthor{Neil Schemenauer}{nas at arctrix.com}
 
-The \module{gc} module is only available if the interpreter was built
-with the optional cyclic garbage detector (enabled by default).  If
-this was not enabled, an \exception{ImportError} is raised by attempts
-to import this module.
-
 This module provides an interface to the optional garbage collector.  It
 provides the ability to disable the collector, tune the collection
 frequency, and set debugging options.  It also provides access to
@@ -19,7 +14,9 @@
 can disable the collector if you are sure your program does not create
 reference cycles.  Automatic collection can be disabled by calling
 \code{gc.disable()}.  To debug a leaking program call
-\code{gc.set_debug(gc.DEBUG_LEAK)}.
+\code{gc.set_debug(gc.DEBUG_LEAK)}. Notice that this includes 
+\code{gc.DEBUG_SAVEALL}, causing garbage-collected objects to be
+saved in gc.garbage for inspection.
 
 The \module{gc} module provides the following functions:
 

Index: libglob.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libglob.tex,v
retrieving revision 1.12.26.1
retrieving revision 1.12.26.2
diff -u -d -r1.12.26.1 -r1.12.26.2
--- libglob.tex	7 Jan 2005 06:57:23 -0000	1.12.26.1
+++ libglob.tex	16 Oct 2005 05:23:57 -0000	1.12.26.2
@@ -16,7 +16,7 @@
 \index{filenames!pathname expansion}
 
 \begin{funcdesc}{glob}{pathname}
-Returns a possibly-empty list of path names that match \var{pathname},
+Return a possibly-empty list of path names that match \var{pathname},
 which must be a string containing a path specification.
 \var{pathname} can be either absolute (like
 \file{/usr/src/Python-1.5/Makefile}) or relative (like
@@ -24,6 +24,12 @@
 Broken symlinks are included in the results (as in the shell).
 \end{funcdesc}
 
+\begin{funcdesc}{iglob}{pathname}
+Return an iterator which yields the same values as \function{glob()}
+without actually storing them all simultaneously.
+\versionadded{2.5}
+\end{funcdesc}
+
 For example, consider a directory containing only the following files:
 \file{1.gif}, \file{2.txt}, and \file{card.gif}.  \function{glob()}
 will produce the following results.  Notice how any leading components

Index: libgrp.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgrp.tex,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- libgrp.tex	1 Mar 2002 10:38:44 -0000	1.16
+++ libgrp.tex	16 Oct 2005 05:23:57 -0000	1.16.2.1
@@ -45,4 +45,5 @@
 
 \begin{seealso}
   \seemodule{pwd}{An interface to the user database, similar to this.}
+  \seemodule{spwd}{An interface to the shadow password database, similar to this.}
 \end{seealso}

Index: libhmac.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhmac.tex,v
retrieving revision 1.1
retrieving revision 1.1.14.1
diff -u -d -r1.1 -r1.1.14.1
--- libhmac.tex	11 Sep 2001 16:56:09 -0000	1.1
+++ libhmac.tex	16 Oct 2005 05:23:57 -0000	1.1.14.1
@@ -14,8 +14,10 @@
 \begin{funcdesc}{new}{key\optional{, msg\optional{, digestmod}}}
   Return a new hmac object.  If \var{msg} is present, the method call
   \code{update(\var{msg})} is made. \var{digestmod} is the digest
-  module for the HMAC object to use. It defaults to the
-  \refmodule{md5} module.
+  constructor or module for the HMAC object to use. It defaults to 
+  the \code{\refmodule{hashlib}.md5} constructor.  \note{The md5 hash
+  has known weaknesses but remains the default for backwards compatibility.
+  Choose a better one for your application.}
 \end{funcdesc}
 
 An HMAC object has the following methods:
@@ -29,14 +31,14 @@
 
 \begin{methoddesc}[hmac]{digest}{}
   Return the digest of the strings passed to the \method{update()}
-  method so far.  This is a 16-byte string (for \refmodule{md5}) or a
-  20-byte string (for \refmodule{sha}) which may contain non-\ASCII{}
-  characters, including NUL bytes.
+  method so far.  This string will be the same length as the
+  \var{digest_size} of the digest given to the constructor.  It
+  may contain non-\ASCII{} characters, including NUL bytes.
 \end{methoddesc}
 
 \begin{methoddesc}[hmac]{hexdigest}{}
-  Like \method{digest()} except the digest is returned as a string of
-  length 32 for \refmodule{md5} (40 for \refmodule{sha}), containing
+  Like \method{digest()} except the digest is returned as a string
+  twice the length containing
   only hexadecimal digits.  This may be used to exchange the value
   safely in email or other non-binary environments.
 \end{methoddesc}
@@ -46,3 +48,7 @@
   efficiently compute the digests of strings that share a common
   initial substring.
 \end{methoddesc}
+
+\begin{seealso}
+  \seemodule{hashlib}{The python module providing secure hash functions.}
+\end{seealso}

Index: libhttplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhttplib.tex,v
retrieving revision 1.31.2.2
retrieving revision 1.31.2.3
diff -u -d -r1.31.2.2 -r1.31.2.3
--- libhttplib.tex	7 Jan 2005 06:57:23 -0000	1.31.2.2
+++ libhttplib.tex	16 Oct 2005 05:23:57 -0000	1.31.2.3
@@ -146,7 +146,7 @@
       {http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1.2}}
   \lineiii{PROCESSING}{\code{102}}
     {WEBDAV, \ulink{RFC 2518, Section 10.1}
-      {http://www.webdav.org/specs/rfc2518.htm#STATUS_102}}
+      {http://www.webdav.org/specs/rfc2518.html#STATUS_102}}
 
   \lineiii{OK}{\code{200}}
     {HTTP/1.1, \ulink{RFC 2616, Section 10.2.1}
@@ -171,7 +171,7 @@
       {http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.7}}
   \lineiii{MULTI_STATUS}{\code{207}}
     {WEBDAV \ulink{RFC 2518, Section 10.2}
-      {http://www.webdav.org/specs/rfc2518.htm#STATUS_207}}
+      {http://www.webdav.org/specs/rfc2518.html#STATUS_207}}
   \lineiii{IM_USED}{\code{226}}
     {Delta encoding in HTTP, \rfc{3229}, Section 10.4.1}
 
@@ -253,13 +253,13 @@
       {http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.18}}
   \lineiii{UNPROCESSABLE_ENTITY}{\code{422}}
     {WEBDAV, \ulink{RFC 2518, Section 10.3}
-      {http://www.webdav.org/specs/rfc2518.htm#STATUS_422}}
+      {http://www.webdav.org/specs/rfc2518.html#STATUS_422}}
   \lineiii{LOCKED}{\code{423}}
     {WEBDAV \ulink{RFC 2518, Section 10.4}
-      {http://www.webdav.org/specs/rfc2518.htm#STATUS_423}}
+      {http://www.webdav.org/specs/rfc2518.html#STATUS_423}}
   \lineiii{FAILED_DEPENDENCY}{\code{424}}
     {WEBDAV, \ulink{RFC 2518, Section 10.5}
-      {http://www.webdav.org/specs/rfc2518.htm#STATUS_424}}
+      {http://www.webdav.org/specs/rfc2518.html#STATUS_424}}
   \lineiii{UPGRADE_REQUIRED}{\code{426}}
     {HTTP Upgrade to TLS, \rfc{2817}, Section 6}
 
@@ -283,7 +283,7 @@
       {http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.6}}
   \lineiii{INSUFFICIENT_STORAGE}{\code{507}}
     {WEBDAV, \ulink{RFC 2518, Section 10.6}
-      {http://www.webdav.org/specs/rfc2518.htm#STATUS_507}}
+      {http://www.webdav.org/specs/rfc2518.html#STATUS_507}}
   \lineiii{NOT_EXTENDED}{\code{510}}
     {An HTTP Extension Framework, \rfc{2774}, Section 7}
 \end{tableiii}
@@ -304,6 +304,8 @@
 \begin{methoddesc}{getresponse}{}
 Should be called after a request is sent to get the response from the server.
 Returns an \class{HTTPResponse} instance.
+\note{Note that you must have read the whole response before you can send a new
+request to the server.}
 \end{methoddesc}
 
 \begin{methoddesc}{set_debuglevel}{level}
@@ -320,11 +322,9 @@
 Close the connection to the server.
 \end{methoddesc}
 
-\begin{methoddesc}{send}{data}
-Send data to the server.  This should be used directly only after the
-\method{endheaders()} method has been called and before
-\method{getreply()} has been called.
-\end{methoddesc}
+As an alternative to using the \method{request()} method described above,
+you can also send your request step by step, by using the four functions
+below.
 
 \begin{methoddesc}{putrequest}{request, selector\optional{,
 skip\_host\optional{, skip_accept_encoding}}}
@@ -349,6 +349,11 @@
 Send a blank line to the server, signalling the end of the headers.
 \end{methoddesc}
 
+\begin{methoddesc}{send}{data}
+Send data to the server.  This should be used directly only after the
+\method{endheaders()} method has been called and before
+\method{getresponse()} is called.
+\end{methoddesc}
 
 \subsection{HTTPResponse Objects \label{httpresponse-objects}}
 

Index: libimaplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimaplib.tex,v
retrieving revision 1.20.2.2
retrieving revision 1.20.2.3
diff -u -d -r1.20.2.2 -r1.20.2.3
--- libimaplib.tex	7 Jan 2005 06:57:23 -0000	1.20.2.2
+++ libimaplib.tex	16 Oct 2005 05:23:57 -0000	1.20.2.3
@@ -143,6 +143,13 @@
 is the header of the response, and the second part contains
 the data (ie: 'literal' value).
 
+The \var{message_set} options to commands below is a string specifying one
+or more messages to be acted upon.  It may be a simple message number
+(\code{'1'}), a range of message numbers (\code{'2:4'}), or a group of
+non-contiguous ranges separated by commas (\code{'1:3,6:9'}).  A range
+can contain an asterisk to indicate an infinite upper bound
+(\code{'3:*'}).
+
 An \class{IMAP4} instance has the following methods:
 
 
@@ -215,6 +222,11 @@
   The method is non-standard, but is supported by the \samp{Cyrus} server.
 \end{methoddesc}
 
+\begin{methoddesc}{getannotation}{mailbox, entry, attribute}
+  Retrieve the specified \samp{ANNOTATION}s for \var{mailbox}.
+  The method is non-standard, but is supported by the \samp{Cyrus} server.
+\end{methoddesc}
+
 \begin{methoddesc}{getquota}{root}
   Get the \samp{quota} \var{root}'s resource usage and limits.
   This method is part of the IMAP4 QUOTA extension defined in rfc2087.
@@ -315,8 +327,7 @@
 \end{methoddesc}
 
 \begin{methoddesc}{search}{charset, criterion\optional{, ...}}
-  Search mailbox for matching messages.  Returned data contains a space
-  separated list of matching message numbers.  \var{charset} may be
+  Search mailbox for matching messages.  \var{charset} may be
   \code{None}, in which case no \samp{CHARSET} will be specified in the
   request to the server.  The IMAP protocol requires that at least one
   criterion be specified; an exception will be raised when the server
@@ -326,10 +337,10 @@
 
 \begin{verbatim}
 # M is a connected IMAP4 instance...
-msgnums = M.search(None, 'FROM', '"LDJ"')
+typ, msgnums = M.search(None, 'FROM', '"LDJ"')
 
 # or:
-msgnums = M.search(None, '(FROM "LDJ")')
+typ, msgnums = M.search(None, '(FROM "LDJ")')
 \end{verbatim}
 \end{methoddesc}
 
@@ -350,6 +361,11 @@
   The method is non-standard, but is supported by the \samp{Cyrus} server.
 \end{methoddesc}
 
+\begin{methoddesc}{setannotation}{mailbox, entry, attribute\optional{, ...}}
+  Set \samp{ANNOTATION}s for \var{mailbox}.
+  The method is non-standard, but is supported by the \samp{Cyrus} server.
+\end{methoddesc}
+
 \begin{methoddesc}{setquota}{root, limits}
   Set the \samp{quota} \var{root}'s resource \var{limits}.
   This method is part of the IMAP4 QUOTA extension defined in rfc2087.
@@ -389,7 +405,18 @@
 \end{methoddesc}
 
 \begin{methoddesc}{store}{message_set, command, flag_list}
-  Alters flag dispositions for messages in mailbox.
+  Alters flag dispositions for messages in mailbox.  \var{command} is
+  specified by section 6.4.6 of \rfc{2060} as being one of "FLAGS", "+FLAGS",
+  or "-FLAGS", optionally with a suffix of ".SILENT".
+
+  For example, to set the delete flag on all messages:
+
+\begin{verbatim}
+typ, data = M.search(None, 'ALL')
+for num in data[0].split():
+   M.store(num, '+FLAGS', '\\Deleted')
+M.expunge()
+\end{verbatim}
 \end{methoddesc}
 
 \begin{methoddesc}{subscribe}{mailbox}
@@ -473,5 +500,6 @@
 for num in data[0].split():
     typ, data = M.fetch(num, '(RFC822)')
     print 'Message %s\n%s\n' % (num, data[0][1])
+M.close()
 M.logout()
 \end{verbatim}

Index: libimghdr.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimghdr.tex,v
retrieving revision 1.13
retrieving revision 1.13.26.1
diff -u -d -r1.13 -r1.13.26.1
--- libimghdr.tex	10 Oct 2000 17:03:45 -0000	1.13
+++ libimghdr.tex	16 Oct 2005 05:23:57 -0000	1.13.26.1
@@ -31,11 +31,13 @@
   \lineii{'tiff'}{TIFF Files}
   \lineii{'rast'}{Sun Raster Files}
   \lineii{'xbm'}{X Bitmap Files}
-  \lineii{'jpeg'}{JPEG data in JFIF format}
+  \lineii{'jpeg'}{JPEG data in JFIF or Exif formats}
   \lineii{'bmp'}{BMP files}
   \lineii{'png'}{Portable Network Graphics}
 \end{tableii}
 
+\versionadded[Exif detection]{2.5}
+
 You can extend the list of file types \module{imghdr} can recognize by
 appending to this variable:
 

Index: libimp.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimp.tex,v
retrieving revision 1.32.2.2
retrieving revision 1.32.2.3
diff -u -d -r1.32.2.2 -r1.32.2.3
--- libimp.tex	7 Jan 2005 06:57:24 -0000	1.32.2.2
+++ libimp.tex	16 Oct 2005 05:23:57 -0000	1.32.2.3
@@ -135,8 +135,8 @@
 \end{datadesc}
 
 \begin{datadesc}{PY_RESOURCE}
-The module was found as a Macintosh resource.  This value can only be
-returned on a Macintosh.
+The module was found as a Mac OS 9 resource.  This value can only be
+returned on a Mac OS 9 or earlier Macintosh.
 \end{datadesc}
 
 \begin{datadesc}{PKG_DIRECTORY}

Index: libitertools.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libitertools.tex,v
retrieving revision 1.7.4.2
retrieving revision 1.7.4.3
diff -u -d -r1.7.4.2 -r1.7.4.3
--- libitertools.tex	7 Jan 2005 06:57:24 -0000	1.7.4.2
+++ libitertools.tex	16 Oct 2005 05:23:57 -0000	1.7.4.3
@@ -252,14 +252,12 @@
   \begin{verbatim}
      def islice(iterable, *args):
          s = slice(*args)
-         next, stop, step = s.start or 0, s.stop, s.step or 1
-         for cnt, element in enumerate(iterable):
-             if cnt < next:
-                 continue
-             if stop is not None and cnt >= stop:
-                 break
-             yield element
-             next += step             
+         it = iter(xrange(s.start or 0, s.stop or sys.maxint, s.step or 1))
+         nexti = it.next()
+         for i, element in enumerate(iterable):
+             if i == nexti:
+                 yield element
+                 nexti = it.next()          
   \end{verbatim}
 
   If \var{start} is \code{None}, then iteration starts at zero.
@@ -461,26 +459,26 @@
     "Returns the nth item"
     return list(islice(iterable, n, n+1))
 
-def all(seq, pred=bool):
-    "Returns True if pred(x) is True for every element in the iterable"
+def all(seq, pred=None):
+    "Returns True if pred(x) is true for every element in the iterable"
     for elem in ifilterfalse(pred, seq):
         return False
     return True
 
-def any(seq, pred=bool):
-    "Returns True if pred(x) is True for at least one element in the iterable"
+def any(seq, pred=None):
+    "Returns True if pred(x) is true for at least one element in the iterable"
     for elem in ifilter(pred, seq):
         return True
     return False
 
-def no(seq, pred=bool):
-    "Returns True if pred(x) is False for every element in the iterable"
+def no(seq, pred=None):
+    "Returns True if pred(x) is false for every element in the iterable"
     for elem in ifilter(pred, seq):
         return False
     return True
 
-def quantify(seq, pred=bool):
-    "Count how many times the predicate is True in the sequence"
+def quantify(seq, pred=None):
+    "Count how many times the predicate is true in the sequence"
     return sum(imap(pred, seq))
 
 def padnone(seq):

Index: liblogging.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblogging.tex,v
retrieving revision 1.8.6.2
retrieving revision 1.8.6.3
diff -u -d -r1.8.6.2 -r1.8.6.3
--- liblogging.tex	7 Jan 2005 06:57:24 -0000	1.8.6.2
+++ liblogging.tex	16 Oct 2005 05:23:57 -0000	1.8.6.3
@@ -92,7 +92,7 @@
 \item \class{FileHandler} instances send error messages to disk
 files.
 
-\item \class{BaseRotatingHandler} is tha base class for handlers that
+\item \class{BaseRotatingHandler} is the base class for handlers that
 rotate log files at a certain point. It is not meant to be  instantiated
 directly. Instead, use \class{RotatingFileHandler} or
 \class{TimedRotatingFileHandler}.
@@ -258,13 +258,32 @@
 it as a \class{LogRecord} instance at the receiving end.
 \end{funcdesc}
 
-\begin{funcdesc}{basicConfig}{}
+\begin{funcdesc}{basicConfig}{\optional{**kwargs}}
 Does basic configuration for the logging system by creating a
 \class{StreamHandler} with a default \class{Formatter} and adding it to
 the root logger. The functions \function{debug()}, \function{info()},
 \function{warning()}, \function{error()} and \function{critical()} will call
 \function{basicConfig()} automatically if no handlers are defined for the
 root logger.
+
+\versionchanged[Formerly, \function{basicConfig} did not take any keyword
+arguments]{2.4}
+
+The following keyword arguments are supported.
+
+\begin{tableii}{l|l}{code}{Format}{Description}
+\lineii{filename}{Specifies that a FileHandler be created, using the
+specified filename, rather than a StreamHandler.}
+\lineii{filemode}{Specifies the mode to open the file, if filename is
+specified (if filemode is unspecified, it defaults to 'a').}
+\lineii{format}{Use the specified format string for the handler.}
+\lineii{datefmt}{Use the specified date/time format.}
+\lineii{level}{Set the root logger level to the specified level.}
+\lineii{stream}{Use the specified stream to initialize the StreamHandler.
+Note that this argument is incompatible with 'filename' - if both
+are present, 'stream' is ignored.}
+\end{tableii}
+
 \end{funcdesc}
 
 \begin{funcdesc}{shutdown}{}
@@ -315,6 +334,20 @@
 to be processed when the logger is the root logger, or delegation to the
 parent when the logger is a non-root logger). Note that the root logger
 is created with level \constant{WARNING}.
+
+The term "delegation to the parent" means that if a logger has a level
+of NOTSET, its chain of ancestor loggers is traversed until either an
+ancestor with a level other than NOTSET is found, or the root is
+reached.
+
+If an ancestor is found with a level other than NOTSET, then that
+ancestor's level is treated as the effective level of the logger where
+the ancestor search began, and is used to determine how a logging
+event is handled.
+
+If the root is reached, and it has a level of NOTSET, then all
+messages will be processed. Otherwise, the root's level will be used
+as the effective level.
 \end{methoddesc}
 
 \begin{methoddesc}{isEnabledFor}{lvl}
@@ -415,6 +448,9 @@
 
 \subsection{Basic example \label{minimal-example}}
 
+\versionchanged[formerly \function{basicConfig} did not take any keyword
+arguments]{2.4}
+
 The \module{logging} package provides a lot of flexibility, and its
 configuration can appear daunting.  This section demonstrates that simple
 use of the logging package is possible.
@@ -1133,8 +1169,7 @@
 \begin{classdesc}{SMTPHandler}{mailhost, fromaddr, toaddrs, subject}
 Returns a new instance of the \class{SMTPHandler} class. The
 instance is initialized with the from and to addresses and subject
-line of the email. The \var{toaddrs} should be a list of strings without
-domain names (That's what the \var{mailhost} is for). To specify a
+line of the email. The \var{toaddrs} should be a list of strings. To specify a
 non-standard SMTP port, use the (host, port) tuple format for the
 \var{mailhost} argument. If you use a string, the standard SMTP port
 is used.
@@ -1269,6 +1304,7 @@
 \lineii{\%(msecs)d}    {Millisecond portion of the time when the
                         \class{LogRecord} was created.}
 \lineii{\%(thread)d}   {Thread ID (if available).}
+\lineii{\%(threadName)s}   {Thread name (if available).}
 \lineii{\%(process)d}  {Process ID (if available).}
 \lineii{\%(message)s}  {The logged message, computed as \code{msg \% args}.}
 \end{tableii}
@@ -1396,7 +1432,10 @@
 will be sent as a file suitable for processing by \function{fileConfig()}.
 Returns a \class{Thread} instance on which you can call \method{start()}
 to start the server, and which you can \method{join()} when appropriate.
-To stop the server, call \function{stopListening()}.
+To stop the server, call \function{stopListening()}. To send a configuration
+to the socket, read in the configuration file and send it to the socket
+as a string of bytes preceded by a four-byte length packed in binary using
+struct.\code{pack(">L", n)}.
 \end{funcdesc}
 
 \begin{funcdesc}{stopListening}{}

Index: libmarshal.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmarshal.tex,v
retrieving revision 1.22.10.1
retrieving revision 1.22.10.2
diff -u -d -r1.22.10.1 -r1.22.10.2
--- libmarshal.tex	7 Jan 2005 06:57:24 -0000	1.22.10.1
+++ libmarshal.tex	16 Oct 2005 05:23:57 -0000	1.22.10.2
@@ -109,8 +109,9 @@
 
 \begin{datadesc}{version}
   Indicates the format that the module uses. Version 0 is the
-  historical format, version 1 (added in Python 2.4) shares
-  interned strings. The current version is 1.
+  historical format, version 1 (added in Python 2.4) shares interned
+  strings and version 2 (added in Python 2.5) uses a binary format for
+  floating point numbers. The current version is 2.
 
   \versionadded{2.4}
-\end{datadesc}
\ No newline at end of file
+\end{datadesc}

Index: libmd5.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmd5.tex,v
retrieving revision 1.21
retrieving revision 1.21.10.1
diff -u -d -r1.21 -r1.21.10.1
--- libmd5.tex	2 Nov 2001 21:44:09 -0000	1.21
+++ libmd5.tex	16 Oct 2005 05:23:57 -0000	1.21.10.1
@@ -4,6 +4,7 @@
 \declaremodule{builtin}{md5}
 \modulesynopsis{RSA's MD5 message digest algorithm.}
 
+\deprecated{2.5}{Use the \refmodule{hashlib} module instead.}
 
 This module implements the interface to RSA's MD5 message digest
 \index{message digest, MD5}

Index: libmmap.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmmap.tex,v
retrieving revision 1.8.8.1
retrieving revision 1.8.8.2
diff -u -d -r1.8.8.1 -r1.8.8.2
--- libmmap.tex	7 Jan 2005 06:57:24 -0000	1.8.8.1
+++ libmmap.tex	16 Oct 2005 05:23:57 -0000	1.8.8.2
@@ -35,7 +35,7 @@
 taken from the specified file.  Assignment to an
 \constant{ACCESS_READ} memory map raises a \exception{TypeError}
 exception.  Assignment to an \constant{ACCESS_WRITE} memory map
-affects both memory and the underlying file.  Assigment to an
+affects both memory and the underlying file.  Assignment to an
 \constant{ACCESS_COPY} memory map affects memory but does not update
 the underlying file.
 
@@ -62,8 +62,10 @@
                          prot\optional{, access}}}}
   \strong{(\UNIX{} version)} Maps \var{length} bytes from the file
   specified by the file descriptor \var{fileno}, and returns a mmap
-  object.
-
+  object.  If \var{length} is \code{0}, the maximum length of the map
+  will be the current size of the file when \function{mmap(} is
+  called.
+  
   \var{flags} specifies the nature of the mapping.
   \constant{MAP_PRIVATE} creates a private copy-on-write mapping, so
   changes to the contents of the mmap object will be private to this
@@ -130,6 +132,7 @@
 \end{methoddesc}
 
 \begin{methoddesc}{resize}{\var{newsize}}
+  Resizes the map and the underlying file, if any.
   If the mmap was created with \constant{ACCESS_READ} or
   \constant{ACCESS_COPY}, resizing the map will throw a \exception{TypeError} exception.
 \end{methoddesc}

Index: libnew.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnew.tex,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -d -r1.9.2.1 -r1.9.2.2
--- libnew.tex	7 Jan 2005 06:57:24 -0000	1.9.2.1
+++ libnew.tex	16 Oct 2005 05:23:57 -0000	1.9.2.2
@@ -47,9 +47,10 @@
 %XXX This is still undocumented!!!!!!!!!!!
 \end{funcdesc}
 
-\begin{funcdesc}{module}{name}
+\begin{funcdesc}{module}{name[, doc]}
 This function returns a new module object with name \var{name}.
 \var{name} must be a string.
+The optional \var{doc} argument can have any type.
 \end{funcdesc}
 
 \begin{funcdesc}{classobj}{name, baseclasses, dict}

Index: libnntplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnntplib.tex,v
retrieving revision 1.27.12.2
retrieving revision 1.27.12.3
diff -u -d -r1.27.12.2 -r1.27.12.3
--- libnntplib.tex	7 Jan 2005 06:57:24 -0000	1.27.12.2
+++ libnntplib.tex	16 Oct 2005 05:23:57 -0000	1.27.12.3
@@ -156,7 +156,7 @@
 Send a \samp{NEWNEWS} command.  Here, \var{group} is a group name or
 \code{'*'}, and \var{date} and \var{time} have the same meaning as for
 \method{newgroups()}.  Return a pair \code{(\var{response},
-\var{articles})} where \var{articles} is a list of article ids.
+\var{articles})} where \var{articles} is a list of message ids.
 If the \var{file} parameter is supplied, then the output of the 
 \samp{NEWNEWS} command is stored in a file.  If \var{file} is a string, 
 then the method will open a file object with that name, write to it 
@@ -228,7 +228,7 @@
 in \character{<} and \character{>}) or an article number (as a string).
 Return a triple \code{(\var{response}, \var{number}, \var{id})} where
 \var{number} is the article number (as a string) and \var{id} is the
-article id  (enclosed in \character{<} and \character{>}).
+message id  (enclosed in \character{<} and \character{>}).
 \end{methoddesc}
 
 \begin{methoddesc}{next}{}
@@ -275,7 +275,7 @@
 the form \code{'\var{first}-\var{last}'} where \var{first} and
 \var{last} are the first and last article numbers to search.  Return a
 pair \code{(\var{response}, \var{list})}, where \var{list} is a list of
-pairs \code{(\var{id}, \var{text})}, where \var{id} is an article id
+pairs \code{(\var{id}, \var{text})}, where \var{id} is an article number
 (as a string) and \var{text} is the text of the requested header for
 that article.
 If the \var{file} parameter is supplied, then the output of the 
@@ -295,7 +295,9 @@
 \end{methoddesc}
 
 \begin{methoddesc}{ihave}{id, file}
-Send an \samp{IHAVE} command.  If the response is not an error, treat
+Send an \samp{IHAVE} command. \var{id} is a message id (enclosed in 
+\character{<} and \character{>}).
+If the response is not an error, treat
 \var{file} exactly as for the \method{post()} method.
 \end{methoddesc}
 

Index: liboperator.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboperator.tex,v
retrieving revision 1.21.10.2
retrieving revision 1.21.10.3
diff -u -d -r1.21.10.2 -r1.21.10.3
--- liboperator.tex	7 Jan 2005 06:57:24 -0000	1.21.10.2
+++ liboperator.tex	16 Oct 2005 05:23:57 -0000	1.21.10.3
@@ -262,7 +262,8 @@
 
 \begin{funcdesc}{isMappingType}{o}
 Returns true if the object \var{o} supports the mapping interface.
-This is true for dictionaries and all instance objects.
+This is true for dictionaries and all instance objects defining
+\method{__getitem__}.
 \warning{There is no reliable way to test if an instance
 supports the complete mapping protocol since the interface itself is
 ill-defined.  This makes this test less useful than it otherwise might
@@ -271,7 +272,7 @@
 
 \begin{funcdesc}{isNumberType}{o}
 Returns true if the object \var{o} represents a number.  This is true
-for all numeric types implemented in C, and for all instance objects.
+for all numeric types implemented in C.
 \warning{There is no reliable way to test if an instance
 supports the complete numeric interface since the interface itself is
 ill-defined.  This makes this test less useful than it otherwise might
@@ -281,7 +282,8 @@
 \begin{funcdesc}{isSequenceType}{o}
 Returns true if the object \var{o} supports the sequence protocol.
 This returns true for all objects which define sequence methods in C,
-and for all instance objects.  \warning{There is no reliable
+and for all instance objects defining \method{__getitem__}.
+\warning{There is no reliable
 way to test if an instance supports the complete sequence interface
 since the interface itself is ill-defined.  This makes this test less
 useful than it otherwise might be.}
@@ -289,7 +291,7 @@
 
 
 Example: Build a dictionary that maps the ordinals from \code{0} to
-\code{256} to their character equivalents.
+\code{255} to their character equivalents.
 
 \begin{verbatim}
 >>> import operator
@@ -306,24 +308,31 @@
 \method{itertools.groupby()}, or other functions that expect a
 function argument.
 
-\begin{funcdesc}{attrgetter}{attr}
+\begin{funcdesc}{attrgetter}{attr\optional{, args...}}
 Return a callable object that fetches \var{attr} from its operand.
+If more than one attribute is requested, returns a tuple of attributes.
 After, \samp{f=attrgetter('name')}, the call \samp{f(b)} returns
-\samp{b.name}.
+\samp{b.name}.  After, \samp{f=attrgetter('name', 'date')}, the call
+\samp{f(b)} returns \samp{(b.name, b.date)}. 
 \versionadded{2.4}
+\versionchanged[Added support for multiple attributes]{2.5}
 \end{funcdesc}
     
-\begin{funcdesc}{itemgetter}{item}
+\begin{funcdesc}{itemgetter}{item\optional{, args...}}
 Return a callable object that fetches \var{item} from its operand.
+If more than one item is requested, returns a tuple of items.
 After, \samp{f=itemgetter(2)}, the call \samp{f(b)} returns
 \samp{b[2]}.
+After, \samp{f=itemgetter(2,5,3)}, the call \samp{f(b)} returns
+\samp{(b[2], b[5], b[3])}.		
 \versionadded{2.4}
+\versionchanged[Added support for multiple item extraction]{2.5}		
 \end{funcdesc}
 
 Examples:
                 
 \begin{verbatim}
->>> from operator import *
+>>> from operator import itemgetter
 >>> inventory = [('apple', 3), ('banana', 2), ('pear', 5), ('orange', 1)]
 >>> getcount = itemgetter(1)
 >>> map(getcount, inventory)

Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.91.2.2
retrieving revision 1.91.2.3
diff -u -d -r1.91.2.2 -r1.91.2.3
--- libos.tex	7 Jan 2005 06:57:25 -0000	1.91.2.2
+++ libos.tex	16 Oct 2005 05:23:57 -0000	1.91.2.3
@@ -106,9 +106,15 @@
 \code{environ} may cause memory leaks.  Refer to the system documentation
 for \cfunction{putenv()}.}
 
-If \function{putenv()} is not provided, this mapping may be passed to
-the appropriate process-creation functions to cause child processes to
-use a modified environment.
+If \function{putenv()} is not provided, a modified copy of this mapping 
+may be passed to the appropriate process-creation functions to cause 
+child processes to use a modified environment.
+
+If the platform supports the \function{unsetenv()} function, you can 
+delete items in this mapping to unset environment variables.
+\function{unsetenv()} will be called automatically when an item is
+deleted from \code{os.environ}.
+
 \end{datadesc}
 
 \begin{funcdescni}{chdir}{path}
@@ -307,7 +313,19 @@
 Availability: recent flavors of \UNIX.
 \end{funcdesc}
 
+\begin{funcdesc}{unsetenv}{varname}
+\index{environment variables!deleting}
+Unset (delete) the environment variable named \var{varname}. Such
+changes to the environment affect subprocesses started with
+\function{os.system()}, \function{popen()} or \function{fork()} and
+\function{execv()}. Availability: most flavors of \UNIX, Windows.
 
+When \function{unsetenv()} is
+supported, deletion of items in \code{os.environ} is automatically
+translated into a corresponding call to \function{unsetenv()}; however,
+calls to \function{unsetenv()} don't update \code{os.environ}, so it is
+actually preferable to delete items of \code{os.environ}.
+\end{funcdesc}
 
 \subsection{File Object Creation \label{os-newstreams}}
 
@@ -337,7 +355,7 @@
 available as the return value of the \method{close()} method of the file
 object, except that when the exit status is zero (termination without
 errors), \code{None} is returned.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 
 \versionchanged[This function worked unreliably under Windows in
   earlier versions of Python.  This was due to the use of the
@@ -350,11 +368,11 @@
 Return a new file object opened in update mode (\samp{w+b}).  The file
 has no directory entries associated with it and will be automatically
 deleted once there are no file descriptors for the file.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 
-For each of these \function{popen()} variants, if \var{bufsize} is
+For each of the following \function{popen()} variants, if \var{bufsize} is
 specified, it specifies the buffer size for the I/O pipes.
 \var{mode}, if provided, should be the string \code{'b'} or
 \code{'t'}; on Windows this is needed to determine whether the file
@@ -366,7 +384,7 @@
 intervention (as with \function{os.spawnv()}). If \var{cmd} is a string it will
 be passed to the shell (as with \function{os.system()}).
 
-These methods do not make it possible to retrieve the return code from
+These methods do not make it possible to retrieve the exit status from
 the child processes.  The only way to control the input and output
 streams and also retrieve the return codes is to use the
 \class{Popen3} and \class{Popen4} classes from the \refmodule{popen2}
@@ -380,21 +398,21 @@
 \begin{funcdesc}{popen2}{cmd\optional{, mode\optional{, bufsize}}}
 Executes \var{cmd} as a sub-process.  Returns the file objects
 \code{(\var{child_stdin}, \var{child_stdout})}.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \versionadded{2.0}
 \end{funcdesc}
 
 \begin{funcdesc}{popen3}{cmd\optional{, mode\optional{, bufsize}}}
 Executes \var{cmd} as a sub-process.  Returns the file objects
 \code{(\var{child_stdin}, \var{child_stdout}, \var{child_stderr})}.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \versionadded{2.0}
 \end{funcdesc}
 
 \begin{funcdesc}{popen4}{cmd\optional{, mode\optional{, bufsize}}}
 Executes \var{cmd} as a sub-process.  Returns the file objects
 \code{(\var{child_stdin}, \var{child_stdout_and_stderr})}.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \versionadded{2.0}
 \end{funcdesc}
 
@@ -409,8 +427,15 @@
 
 \subsection{File Descriptor Operations \label{os-fd-ops}}
 
-These functions operate on I/O streams referred to
-using file descriptors.
+These functions operate on I/O streams referenced using file
+descriptors.  
+
+File descriptors are small integers corresponding to a file that has
+been opened by the current process.  For example, standard input is
+usually file descriptor 0, standard output is 1, and standard error is
+2.  Further files opened by a process will then be assigned 3, 4, 5,
+and so forth.  The name ``file descriptor'' is slightly deceptive; on
+{\UNIX} platforms, sockets and pipes are also referenced by file descriptors.
 
 
 \begin{funcdesc}{close}{fd}
@@ -434,7 +459,7 @@
 \begin{funcdesc}{dup2}{fd, fd2}
 Duplicate file descriptor \var{fd} to \var{fd2}, closing the latter
 first if necessary.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{fdatasync}{fd}
@@ -453,7 +478,7 @@
 \code{pathconf_names} dictionary.  For configuration variables not
 included in that mapping, passing an integer for \var{name} is also
 accepted.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 
 If \var{name} is a string and is not known, \exception{ValueError} is
 raised.  If a specific value for \var{name} is not supported by the
@@ -464,7 +489,7 @@
 
 \begin{funcdesc}{fstat}{fd}
 Return status for file descriptor \var{fd}, like \function{stat()}.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{fstatvfs}{fd}
@@ -482,19 +507,19 @@
 \code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno())},
 to ensure that all internal buffers associated with \var{f} are written
 to disk.
-Availability: \UNIX, and Windows starting in 2.2.3.
+Availability: Macintosh, \UNIX, and Windows starting in 2.2.3.
 \end{funcdesc}
 
 \begin{funcdesc}{ftruncate}{fd, length}
 Truncate the file corresponding to file descriptor \var{fd},
 so that it is at most \var{length} bytes in size.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{isatty}{fd}
 Return \code{True} if the file descriptor \var{fd} is open and
 connected to a tty(-like) device, else \code{False}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{lseek}{fd, pos, how}
@@ -531,13 +556,13 @@
 \code{(\var{master}, \var{slave})} for the pty and the tty,
 respectively. For a (slightly) more portable approach, use the
 \refmodule{pty}\refstmodindex{pty} module.
-Availability: Some flavors of \UNIX.
+Availability: Macintosh, Some flavors of \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{pipe}{}
 Create a pipe.  Return a pair of file descriptors \code{(\var{r},
 \var{w})} usable for reading and writing, respectively.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{read}{fd, n}
@@ -560,21 +585,21 @@
 \begin{funcdesc}{tcgetpgrp}{fd}
 Return the process group associated with the terminal given by
 \var{fd} (an open file descriptor as returned by \function{open()}).
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{tcsetpgrp}{fd, pg}
 Set the process group associated with the terminal given by
 \var{fd} (an open file descriptor as returned by \function{open()})
 to \var{pg}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{ttyname}{fd}
 Return a string which specifies the terminal device associated with
 file-descriptor \var{fd}.  If \var{fd} is not associated with a terminal
 device, an exception is raised.
-Availability: \UNIX.
+Availability:Macintosh,  \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{write}{fd, str}
@@ -594,7 +619,9 @@
 
 
 The following data items are available for use in constructing the
-\var{flags} parameter to the \function{open()} function.
+\var{flags} parameter to the \function{open()} function.  Some items will
+not be available on all platforms.  For descriptions of their availability
+and use, consult \manpage{open}{2}.
 
 \begin{datadesc}{O_RDONLY}
 \dataline{O_WRONLY}
@@ -614,6 +641,8 @@
 \dataline{O_NDELAY}
 \dataline{O_NONBLOCK}
 \dataline{O_NOCTTY}
+\dataline{O_SHLOCK}
+\dataline{O_EXLOCK}
 More options for the \var{flag} argument to the \function{open()} function.
 Availability: Macintosh, \UNIX.
 \end{datadesc}
@@ -621,7 +650,7 @@
 \begin{datadesc}{O_BINARY}
 Option for the \var{flag} argument to the \function{open()} function.
 This can be bit-wise OR'd together with those listed above.
-Availability: Macintosh, Windows.
+Availability: Windows.
 % XXX need to check on the availability of this one.
 \end{datadesc}
 
@@ -636,6 +665,15 @@
 Availability: Windows.
 \end{datadesc}
 
+\begin{datadesc}{SEEK_SET}
+\dataline{SEEK_CUR}
+\dataline{SEEK_END}
+Parameters to the \function{lseek()} function.
+Their values are 0, 1, and 2, respectively.
+Availability: Windows, Macintosh, \UNIX.
+\versionadded{2.5}
+\end{datadesc}
+
 \subsection{Files and Directories \label{os-file-dir}}
 
 \begin{funcdesc}{access}{path, mode}
@@ -648,7 +686,17 @@
 test permissions.  Return \constant{True} if access is allowed,
 \constant{False} if not.
 See the \UNIX{} man page \manpage{access}{2} for more information.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
+
+\note{Using \function{access()} to check if a user is authorized to e.g.
+open a file before actually doing so using \function{open()} creates a 
+security hole, because the user might exploit the short time interval 
+between checking and opening the file to manipulate it.}
+
+\note{I/O operations may fail even when \function{access()}
+indicates that they would succeed, particularly for operations
+on network filesystems which may have permissions semantics
+beyond the usual \POSIX{} permission-bit model.}
 \end{funcdesc}
 
 \begin{datadesc}{F_OK}
@@ -692,13 +740,13 @@
 
 \begin{funcdesc}{getcwdu}{}
 Return a Unicode object representing the current working directory.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \versionadded{2.3}
 \end{funcdesc}
 
 \begin{funcdesc}{chroot}{path}
 Change the root directory of the current process to \var{path}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.2}
 \end{funcdesc}
 
@@ -727,25 +775,30 @@
   \item \code{S_IWOTH}
   \item \code{S_IXOTH}
 \end{itemize}
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
+
+\note{Although Windows supports \function{chmod()}, you can only 
+set the file's read-only flag with it (via the \code{S_IWRITE} 
+and \code{S_IREAD} constants or a corresponding integer value). 
+All other bits are ignored.}
 \end{funcdesc}
 
 \begin{funcdesc}{chown}{path, uid, gid}
 Change the owner and group id of \var{path} to the numeric \var{uid}
-and \var{gid}.
-Availability: \UNIX.
+and \var{gid}. To leave one of the ids unchanged, set it to -1.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{lchown}{path, uid, gid}
 Change the owner and group id of \var{path} to the numeric \var{uid}
 and gid. This function will not follow symbolic links.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{funcdesc}
 
 \begin{funcdesc}{link}{src, dst}
 Create a hard link pointing to \var{src} named \var{dst}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{listdir}{path}
@@ -755,20 +808,20 @@
 directory.
 Availability: Macintosh, \UNIX, Windows.
 
-\versionchanged[On Windows NT/2k/XP and Unix, if \var{path} is a Unicode
+\versionchanged[On Windows NT/2k/XP and \UNIX, if \var{path} is a Unicode
 object, the result will be a list of Unicode objects.]{2.3}
 \end{funcdesc}
 
 \begin{funcdesc}{lstat}{path}
 Like \function{stat()}, but do not follow symbolic links.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{mkfifo}{path\optional{, mode}}
 Create a FIFO (a named pipe) named \var{path} with numeric mode
 \var{mode}.  The default \var{mode} is \code{0666} (octal).  The current
 umask value is first masked out from the mode.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 
 FIFOs are pipes that can be accessed like regular files.  FIFOs exist
 until they are deleted (for example with \function{os.unlink()}).
@@ -790,12 +843,14 @@
 \end{funcdesc}
 
 \begin{funcdesc}{major}{device}
-Extracts a device major number from a raw device number.
+Extracts the device major number from a raw device number (usually
+the \member{st_dev} or \member{st_rdev} field from \ctype{stat}).
 \versionadded{2.3}
 \end{funcdesc}
 
 \begin{funcdesc}{minor}{device}
-Extracts a device minor number from a raw device number.
+Extracts the device minor number from a raw device number (usually
+the \member{st_dev} or \member{st_rdev} field from \ctype{stat}).
 \versionadded{2.3}
 \end{funcdesc}
 
@@ -835,7 +890,7 @@
 \code{pathconf_names} dictionary.  For configuration variables not
 included in that mapping, passing an integer for \var{name} is also
 accepted.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 
 If \var{name} is a string and is not known, \exception{ValueError} is
 raised.  If a specific value for \var{name} is not supported by the
@@ -849,7 +904,7 @@
 \function{fpathconf()} to the integer values defined for those names
 by the host operating system.  This can be used to determine the set
 of names known to the system.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{datadesc}
 
 \begin{funcdesc}{readlink}{path}
@@ -857,7 +912,7 @@
 points.  The result may be either an absolute or relative pathname; if
 it is relative, it may be converted to an absolute pathname using
 \code{os.path.join(os.path.dirname(\var{path}), \var{result})}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{remove}{path}
@@ -931,18 +986,35 @@
 \member{st_mtime} (time of most recent content modification),
 \member{st_ctime}
 (platform dependent; time of most recent metadata change on \UNIX, or
-the time of creation on Windows).
+the time of creation on Windows):
+
+\begin{verbatim}
+>>> import os
+>>> statinfo = os.stat('somefile.txt')
+>>> statinfo
+(33188, 422511L, 769L, 1, 1032, 100, 926L, 1105022698,1105022732, 1105022732)
+>>> statinfo.st_size
+926L
+>>>
+\end{verbatim}
 
 \versionchanged [If \function{stat_float_times} returns true, the time
 values are floats, measuring seconds. Fractions of a second may be
 reported if the system supports that. On Mac OS, the times are always
 floats. See \function{stat_float_times} for further discussion. ]{2.3}
 
-On some Unix systems (such as Linux), the following attributes may
+On some \UNIX{} systems (such as Linux), the following attributes may
 also be available:
 \member{st_blocks} (number of blocks allocated for file),
 \member{st_blksize} (filesystem blocksize),
 \member{st_rdev} (type of device if an inode device).
+\member{st_flags} (user defined flags for file).
+
+On other \UNIX{} systems (such as FreeBSD), the following attributes
+may be available (but may be only filled out of root tries to
+use them:
+\member{st_gen} (file generation number),
+\member{st_birthtime} (time of file creation).
 
 On Mac OS systems, the following attributes may also be available:
 \member{st_rsize},
@@ -985,6 +1057,7 @@
 
 \versionchanged
 [Added access to values as attributes of the returned object]{2.2}
+\versionchanged[Added st_gen, st_birthtime]{2.5}
 \end{funcdesc}
 
 \begin{funcdesc}{stat_float_times}{\optional{newvalue}}
@@ -994,16 +1067,15 @@
 the current setting.
 
 For compatibility with older Python versions, accessing
-\class{stat_result} as a tuple always returns integers. For
-compatibility with Python 2.2, accessing the time stamps by field name
-also returns integers. Applications that want to determine the
-fractions of a second in a time stamp can use this function to have
-time stamps represented as floats. Whether they will actually observe
-non-zero fractions depends on the system.
+\class{stat_result} as a tuple always returns integers.
 
-Future Python releases will change the default of this setting;
-applications that cannot deal with floating point time stamps can then
-use this function to turn the feature off.
+\versionchanged[Python now returns float values by default. Applications
+which do not work correctly with floating point time stamps can use
+this function to restore the old behaviour]{2.5}
+
+The resolution of the timestamps (i.e. the smallest possible fraction)
+depends on the system. Some systems only support second resolution;
+on these systems, the fraction will always be zero.
 
 It is recommended that this setting is only changed at program startup
 time in the \var{__main__} module; libraries should never change this
@@ -1060,8 +1132,8 @@
 behavior of this function depends on the C library implementation;
 some aspects are underspecified in system documentation.
 \warning{Use of \function{tempnam()} is vulnerable to symlink attacks;
-consider using \function{tmpfile()} instead.}
-Availability: \UNIX, Windows.
+consider using \function{tmpfile()} (section \ref{os-newstreams})
+instead.}  Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{tmpnam}{}
@@ -1072,12 +1144,13 @@
 paths returned by \function{tmpnam()}; no automatic cleanup is
 provided.
 \warning{Use of \function{tmpnam()} is vulnerable to symlink attacks;
-consider using \function{tmpfile()} instead.}
-Availability: \UNIX, Windows.  This function probably shouldn't be used
-on Windows, though:  Microsoft's implementation of \function{tmpnam()}
-always creates a name in the root directory of the current drive, and
-that's generally a poor location for a temp file (depending on
-privileges, you may not even be able to open a file using this name).
+consider using \function{tmpfile()} (section \ref{os-newstreams})
+instead.}  Availability: \UNIX, Windows.  This function probably
+shouldn't be used on Windows, though: Microsoft's implementation of
+\function{tmpnam()} always creates a name in the root directory of the
+current drive, and that's generally a poor location for a temp file
+(depending on privileges, you may not even be able to open a file
+using this name).
 \end{funcdesc}
 
 \begin{datadesc}{TMP_MAX}
@@ -1220,7 +1293,7 @@
 process immediately returns an exit code of \code{3}.  Be aware that
 programs which use \function{signal.signal()} to register a handler
 for \constant{SIGABRT} will behave differently.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{execl}{path, arg0, arg1, \moreargs}
@@ -1266,13 +1339,13 @@
 \function{execlp()}, \function{execv()}, and \function{execvp()}
 all cause the new process to inherit the environment of the current
 process.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{_exit}{n}
 Exit to the system with status \var{n}, without calling cleanup
 handlers, flushing stdio buffers, etc.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 
 \begin{notice}
 The standard way to exit is \code{sys.exit(\var{n})}.
@@ -1285,79 +1358,82 @@
 \function{_exit()}, although they are not required.  These are
 typically used for system programs written in Python, such as a
 mail server's external command delivery program.
+\note{Some of these may not be available on all \UNIX{} platforms,
+since there is some variation.  These constants are defined where they
+are defined by the underlying platform.}
 
 \begin{datadesc}{EX_OK}
 Exit code that means no error occurred.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_USAGE}
 Exit code that means the command was used incorrectly, such as when
 the wrong number of arguments are given.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_DATAERR}
 Exit code that means the input data was incorrect.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_NOINPUT}
 Exit code that means an input file did not exist or was not readable.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_NOUSER}
 Exit code that means a specified user did not exist.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_NOHOST}
 Exit code that means a specified host did not exist.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_UNAVAILABLE}
 Exit code that means that a required service is unavailable.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_SOFTWARE}
 Exit code that means an internal software error was detected.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_OSERR}
 Exit code that means an operating system error was detected, such as
 the inability to fork or create a pipe.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_OSFILE}
 Exit code that means some system file did not exist, could not be
 opened, or had some other kind of error.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_CANTCREAT}
 Exit code that means a user specified output file could not be created.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_IOERR}
 Exit code that means that an error occurred while doing I/O on some file.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
@@ -1365,40 +1441,40 @@
 Exit code that means a temporary failure occurred.  This indicates
 something that may not really be an error, such as a network
 connection that couldn't be made during a retryable operation.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_PROTOCOL}
 Exit code that means that a protocol exchange was illegal, invalid, or
 not understood.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_NOPERM}
 Exit code that means that there were insufficient permissions to
 perform the operation (but not intended for file system problems).
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_CONFIG}
 Exit code that means that some kind of configuration error occurred.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{datadesc}{EX_NOTFOUND}
 Exit code that means something like ``an entry was not found''.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
 \begin{funcdesc}{fork}{}
 Fork a child process.  Return \code{0} in the child, the child's
 process id in the parent.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{forkpty}{}
@@ -1408,7 +1484,7 @@
 in the parent, and \var{fd} is the file descriptor of the master end
 of the pseudo-terminal.  For a more portable approach, use the
 \refmodule{pty} module.
-Availability: Some flavors of \UNIX.
+Availability: Macintosh, Some flavors of \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{kill}{pid, sig}
@@ -1417,27 +1493,27 @@
 Kill the process \var{pid} with signal \var{sig}.  Constants for the
 specific signals available on the host platform are defined in the
 \refmodule{signal} module.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{killpg}{pgid, sig}
 \index{process!killing}
 \index{process!signalling}
 Kill the process group \var{pgid} with the signal \var{sig}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{funcdesc}
 
 \begin{funcdesc}{nice}{increment}
 Add \var{increment} to the process's ``niceness''.  Return the new
 niceness.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{plock}{op}
 Lock program segments into memory.  The value of \var{op}
 (defined in \code{<sys/lock.h>}) determines which segments are locked.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdescni}{popen}{\unspecified}
@@ -1518,7 +1594,7 @@
 family of functions.  If either of these values is given, the
 \function{spawn*()} functions will return as soon as the new process
 has been created, with the process ID as the return value.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \versionadded{1.6}
 \end{datadesc}
 
@@ -1529,7 +1605,7 @@
 has run to completion and will return the exit code of the process the
 run is successful, or \code{-\var{signal}} if a signal kills the
 process.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \versionadded{1.6}
 \end{datadesc}
 
@@ -1583,7 +1659,7 @@
 and XP) this is the exit status of the command run; on systems using
 a non-native shell, consult your shell documentation.
 
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{times}{}
@@ -1594,7 +1670,7 @@
 point in the past, in that order.  See the \UNIX{} manual page
 \manpage{times}{2} or the corresponding Windows Platform API
 documentation.
-Availability: \UNIX, Windows.
+Availability: Macintosh, \UNIX, Windows.
 \end{funcdesc}
 
 \begin{funcdesc}{wait}{}
@@ -1603,7 +1679,7 @@
 the signal number that killed the process, and whose high byte is the
 exit status (if the signal number is zero); the high bit of the low
 byte is set if a core file was produced.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{waitpid}{pid, options}
@@ -1639,9 +1715,10 @@
 \end{funcdesc}
 
 \begin{datadesc}{WNOHANG}
-The option for \function{waitpid()} to avoid hanging if no child
-process status is available immediately.
-Availability: \UNIX.
+The option for \function{waitpid()} to return immediately if no child
+process status is available immediately. The function returns
+\code{(0, 0)} in this case.
+Availability: Macintosh, \UNIX.
 \end{datadesc}
 
 \begin{datadesc}{WCONTINUED}
@@ -1656,7 +1733,7 @@
 This option causes child processes to be reported if they have been
 stopped but their current state has not been reported since they were
 stopped.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{datadesc}
 
@@ -1668,7 +1745,7 @@
 \begin{funcdesc}{WCOREDUMP}{status}
 Returns \code{True} if a core dump was generated for the process,
 otherwise it returns \code{False}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \versionadded{2.3}
 \end{funcdesc}
 
@@ -1688,30 +1765,30 @@
 \begin{funcdesc}{WIFSIGNALED}{status}
 Returns \code{True} if the process exited due to a signal, otherwise
 it returns \code{False}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{WIFEXITED}{status}
 Returns \code{True} if the process exited using the \manpage{exit}{2}
 system call, otherwise it returns \code{False}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{WEXITSTATUS}{status}
 If \code{WIFEXITED(\var{status})} is true, return the integer
 parameter to the \manpage{exit}{2} system call.  Otherwise, the return
 value is meaningless.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{WSTOPSIG}{status}
 Return the signal which caused the process to stop.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{funcdesc}{WTERMSIG}{status}
 Return the signal which caused the process to exit.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 
@@ -1728,7 +1805,7 @@
 \code{confstr_names} dictionary.  For configuration variables not
 included in that mapping, passing an integer for \var{name} is also
 accepted.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 
 If the configuration value specified by \var{name} isn't defined, the
 empty string is returned.
@@ -1744,7 +1821,7 @@
 Dictionary mapping names accepted by \function{confstr()} to the
 integer values defined for those names by the host operating system.
 This can be used to determine the set of names known to the system.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{datadesc}
 
 \begin{funcdesc}{getloadavg}{}
@@ -1762,14 +1839,14 @@
 parameter for \function{confstr()} apply here as well; the dictionary
 that provides information on the known names is given by
 \code{sysconf_names}.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{funcdesc}
 
 \begin{datadesc}{sysconf_names}
 Dictionary mapping names accepted by \function{sysconf()} to the
 integer values defined for those names by the host operating system.
 This can be used to determine the set of names known to the system.
-Availability: \UNIX.
+Availability: Macintosh, \UNIX.
 \end{datadesc}
 
 
@@ -1783,21 +1860,21 @@
 \begin{datadesc}{curdir}
 The constant string used by the operating system to refer to the current
 directory.
-For example: \code{'.'} for \POSIX{} or \code{':'} for the Macintosh.
+For example: \code{'.'} for \POSIX{} or \code{':'} for Mac OS 9.
 Also available via \module{os.path}.
 \end{datadesc}
 
 \begin{datadesc}{pardir}
 The constant string used by the operating system to refer to the parent
 directory.
-For example: \code{'..'} for \POSIX{} or \code{'::'} for the Macintosh.
+For example: \code{'..'} for \POSIX{} or \code{'::'} for Mac OS 9.
 Also available via \module{os.path}.
 \end{datadesc}
 
 \begin{datadesc}{sep}
 The character used by the operating system to separate pathname components,
-for example, \character{/} for \POSIX{} or \character{:} for the
-Macintosh.  Note that knowing this is not sufficient to be able to
+for example, \character{/} for \POSIX{} or \character{:} for
+Mac OS 9.  Note that knowing this is not sufficient to be able to
 parse or concatenate pathnames --- use \function{os.path.split()} and
 \function{os.path.join()} --- but it is occasionally useful.
 Also available via \module{os.path}.
@@ -1841,8 +1918,8 @@
 
 \begin{datadesc}{devnull}
 The file path of the null device.
-For example: \code{'/dev/null'} for \POSIX{} or \code{'Dev:Nul'} for the
-Macintosh.
+For example: \code{'/dev/null'} for \POSIX{} or \code{'Dev:Nul'} for
+Mac OS 9.
 Also available via \module{os.path}.
 \versionadded{2.4}
 \end{datadesc}

Index: libossaudiodev.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libossaudiodev.tex,v
retrieving revision 1.6.4.2
retrieving revision 1.6.4.3
diff -u -d -r1.6.4.2 -r1.6.4.3
--- libossaudiodev.tex	7 Jan 2005 06:57:26 -0000	1.6.4.2
+++ libossaudiodev.tex	16 Oct 2005 05:23:57 -0000	1.6.4.3
@@ -115,7 +115,7 @@
 as flexible in all cases.
 
 The audio device objects returned by \function{open()} define the
-following methods:
+following methods and (read-only) attributes:
 
 \begin{methoddesc}[audio device]{close}{}
 Explicitly close the audio device.  When you are done writing to or
@@ -166,7 +166,7 @@
 
 \begin{methoddesc}[audio device]{getfmts}{}
 Return a bitmask of the audio output formats supported by the
-soundcard.  On a typical Linux system, these formats are:
+soundcard.  Some of the formats supported by OSS are:
 
 \begin{tableii}{l|l}{constant}{Format}{Description}
 \lineii{AFMT_MU_LAW}
@@ -180,21 +180,22 @@
 \lineii{AFMT_U8}
        {Unsigned, 8-bit audio}
 \lineii{AFMT_S16_LE}
-       {Unsigned, 16-bit audio, little-endian byte order (as used by
+       {Signed, 16-bit audio, little-endian byte order (as used by
         Intel processors)}
 \lineii{AFMT_S16_BE}
-       {Unsigned, 16-bit audio, big-endian byte order (as used by 68k,
+       {Signed, 16-bit audio, big-endian byte order (as used by 68k,
         PowerPC, Sparc)}
 \lineii{AFMT_S8}
        {Signed, 8 bit audio}
 \lineii{AFMT_U16_LE}
-       {Signed, 16-bit little-endian audio}
+       {Unsigned, 16-bit little-endian audio}
 \lineii{AFMT_U16_BE}
-       {Signed, 16-bit big-endian audio}
+       {Unsigned, 16-bit big-endian audio}
 \end{tableii}
-Most systems support only a subset of these formats.  Many devices only
-support \constant{AFMT_U8}; the most common format used today is
-\constant{AFMT_S16_LE}.
+Consult the OSS documentation for a full list of audio formats, and note
+that most devices support only a subset of these formats.  Some older
+devices only support \constant{AFMT_U8}; the most common format used
+today is \constant{AFMT_S16_LE}.
 \end{methoddesc}
 
 \begin{methoddesc}[audio device]{setfmt}{format}
@@ -289,6 +290,21 @@
 buffer to be played without blocking.
 \end{methoddesc}
 
+Audio device objects also support several read-only attributes:
+
+\begin{memberdesc}[audio device]{closed}{}
+Boolean indicating whether the device has been closed.
+\end{memberdesc}
+
+\begin{memberdesc}[audio device]{name}{}
+String containing the name of the device file.
+\end{memberdesc}
+
+\begin{memberdesc}[audio device]{mode}{}
+The I/O mode for the file, either \code{"r"}, \code{"rw"}, or \code{"w"}.
+\end{memberdesc}
+
+
 \subsection{Mixer Device Objects \label{mixer-device-objects}}
 
 The mixer object provides two file-like methods:

Index: libpoplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpoplib.tex,v
retrieving revision 1.14.8.2
retrieving revision 1.14.8.3
diff -u -d -r1.14.8.2 -r1.14.8.3
--- libpoplib.tex	7 Jan 2005 06:57:26 -0000	1.14.8.2
+++ libpoplib.tex	16 Oct 2005 05:23:57 -0000	1.14.8.3
@@ -108,8 +108,8 @@
 
 \begin{methoddesc}{list}{\optional{which}}
 Request message list, result is in the form
-\code{(\var{response}, ['mesg_num octets', ...])}.  If \var{which} is
-set, it is the message to list.
+\code{(\var{response}, ['mesg_num octets', ...], \var{octets})}.
+If \var{which} is set, it is the message to list.
 \end{methoddesc}
 
 \begin{methoddesc}{retr}{which}

Index: libposixpath.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libposixpath.tex,v
retrieving revision 1.23.2.2
retrieving revision 1.23.2.3
diff -u -d -r1.23.2.2 -r1.23.2.3
--- libposixpath.tex	7 Jan 2005 06:57:26 -0000	1.23.2.2
+++ libposixpath.tex	16 Oct 2005 05:23:57 -0000	1.23.2.3
@@ -55,12 +55,20 @@
 \end{funcdesc}
 
 \begin{funcdesc}{expanduser}{path}
-Return the argument with an initial component of \samp{\~} or
-\samp{\~\var{user}} replaced by that \var{user}'s home directory.  An
-initial \samp{\~{}} is replaced by the environment variable
-\envvar{HOME}; an initial \samp{\~\var{user}} is looked up in the
-password directory through the built-in module
-\refmodule{pwd}\refbimodindex{pwd}.  If the expansion fails, or if the
+On \UNIX, return the argument with an initial component of \samp{\~} or
+\samp{\~\var{user}} replaced by that \var{user}'s home directory.
+An initial \samp{\~} is replaced by the environment variable
+\envvar{HOME} if it is set; otherwise the current user's home directory
+is looked up in the password directory through the built-in module
+\refmodule{pwd}\refbimodindex{pwd}.
+An initial \samp{\~\var{user}} is looked up directly in the
+password directory.
+
+On Windows, only \samp{\~} is supported; it is replaced by the
+environment variable \envvar{HOME} or by a combination of
+\envvar{HOMEDRIVE} and \envvar{HOMEPATH}.
+
+If the expansion fails or if the
 path does not begin with a tilde, the path is returned unchanged.
 \end{funcdesc}
 
@@ -158,7 +166,7 @@
 
 \begin{funcdesc}{normpath}{path}
 Normalize a pathname.  This collapses redundant separators and
-up-level references, e.g. \code{A//B}, \code{A/./B} and
+up-level references so that \code{A//B}, \code{A/./B} and
 \code{A/foo/../B} all become \code{A/B}.  It does not normalize the
 case (use \function{normcase()} for that).  On Windows, it converts
 forward slashes to backward slashes. It should be understood that this may
@@ -226,6 +234,15 @@
 at most one period.
 \end{funcdesc}
 
+\begin{funcdesc}{splitunc}{path}
+Split the pathname \var{path} into a pair \code{(\var{unc}, \var{rest})}
+so that \var{unc} is the UNC mount point (such as \code{r'\e\e host\e mount'}),
+if present, and \var{rest} the rest of the path (such as 
+\code{r'\e path\e file.ext'}).  For paths containing drive letters, \var{unc}
+will always be the empty string.
+Availability:  Windows.
+\end{funcdesc}
+
 \begin{funcdesc}{walk}{path, visit, arg}
 Calls the function \var{visit} with arguments
 \code{(\var{arg}, \var{dirname}, \var{names})} for each directory in the
@@ -234,7 +251,7 @@
 directory, the argument \var{names} lists the files in the directory
 (gotten from \code{os.listdir(\var{dirname})}).
 The \var{visit} function may modify \var{names} to
-influence the set of directories visited below \var{dirname}, e.g., to
+influence the set of directories visited below \var{dirname}, e.g. to
 avoid visiting certain parts of the tree.  (The object referred to by
 \var{names} must be modified in place, using \keyword{del} or slice
 assignment.)

Index: libpwd.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpwd.tex,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- libpwd.tex	1 Mar 2002 10:47:36 -0000	1.14
+++ libpwd.tex	16 Oct 2005 05:23:57 -0000	1.14.2.1
@@ -29,9 +29,12 @@
 contains a password encrypted with a DES derived algorithm (see module
 \refmodule{crypt}\refbimodindex{crypt}).  However most modern unices 
 use a so-called \emph{shadow password} system.  On those unices the
-field \code{pw_passwd} only contains a asterisk (\code{'*'}) or the 
+\var{pw_passwd} field only contains an asterisk (\code{'*'}) or the 
 letter \character{x} where the encrypted password is stored in a file
-\file{/etc/shadow} which is not world readable.}
+\file{/etc/shadow} which is not world readable.  Whether the \var{pw_passwd}
+field contains anything useful is system-dependent.  If available, the
+\module{spwd} module should be used where access to the encrypted password
+is required.}
 
 It defines the following items:
 
@@ -50,4 +53,5 @@
 
 \begin{seealso}
   \seemodule{grp}{An interface to the group database, similar to this.}
+  \seemodule{spwd}{An interface to the shadow password database, similar to this.}
 \end{seealso}

Index: librandom.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/librandom.tex,v
retrieving revision 1.30.2.2
retrieving revision 1.30.2.3
diff -u -d -r1.30.2.2 -r1.30.2.3
--- librandom.tex	7 Jan 2005 06:57:27 -0000	1.30.2.2
+++ librandom.tex	16 Oct 2005 05:23:57 -0000	1.30.2.3
@@ -159,8 +159,8 @@
   population contains repeats, then each occurrence is a possible
   selection in the sample.
 
-  To choose a sample from a range of integers, use \function{xrange}
-  as an argument.  This is especially fast and space efficient for
+  To choose a sample from a range of integers, use an \function{xrange()}
+  object as an argument.  This is especially fast and space efficient for
   sampling from a large population:  \code{sample(xrange(10000000), 60)}.
 \end{funcdesc}
 
@@ -236,7 +236,7 @@
 
 \begin{classdesc}{WichmannHill}{\optional{seed}}
 Class that implements the Wichmann-Hill algorithm as the core generator.
-Has all of the same methods as \class{Random} plus the \method{whseed}
+Has all of the same methods as \class{Random} plus the \method{whseed()}
 method described below.  Because this class is implemented in pure
 Python, it is not threadsafe and may require locks between calls.  The
 period of the generator is 6,953,607,871,644 which is small enough to
@@ -246,7 +246,7 @@
 \begin{funcdesc}{whseed}{\optional{x}}
   This is obsolete, supplied for bit-level compatibility with versions
   of Python prior to 2.1.
-  See \function{seed} for details.  \function{whseed} does not guarantee
+  See \function{seed()} for details.  \function{whseed()} does not guarantee
   that distinct integer arguments yield distinct internal states, and can
   yield no more than about 2**24 distinct internal states in all.
 \end{funcdesc}

Index: libre.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libre.tex,v
retrieving revision 1.84.2.2
retrieving revision 1.84.2.3
diff -u -d -r1.84.2.2 -r1.84.2.3
--- libre.tex	7 Jan 2005 06:57:27 -0000	1.84.2.2
+++ libre.tex	16 Oct 2005 05:23:57 -0000	1.84.2.3
@@ -342,17 +342,33 @@
 at the beginning or end of a word.  This is just the opposite of {}\code{\e
 b}, so is also subject to the settings of \code{LOCALE} and \code{UNICODE}.
 
-\item[\code{\e d}]Matches any decimal digit; this is
-equivalent to the set \regexp{[0-9]}.
+\item[\code{\e d}]When the \constant{UNICODE} flag is not specified, matches
+any decimal digit; this is equivalent to the set \regexp{[0-9]}. 
+With \constant{UNICODE}, it will match whatever is classified as a digit
+in the Unicode character properties database.
 
-\item[\code{\e D}]Matches any non-digit character; this is
-equivalent to the set \regexp{[{\textasciicircum}0-9]}.
+\item[\code{\e D}]When the \constant{UNICODE} flag is not specified, matches
+any non-digit character; this is equivalent to the set 
+\regexp{[{\textasciicircum}0-9]}.  With \constant{UNICODE}, it will match 
+anything other than character marked as digits in the Unicode character 
+properties database.
 
-\item[\code{\e s}]Matches any whitespace character; this is
+\item[\code{\e s}]When the \constant{LOCALE} and \constant{UNICODE}
+flags are not specified, matches any whitespace character; this is
 equivalent to the set \regexp{[ \e t\e n\e r\e f\e v]}.
+With \constant{LOCALE}, it will match this set plus whatever characters
+are defined as space for the current locale. If \constant{UNICODE} is set,
+this will match the characters \regexp{[ \e t\e n\e r\e f\e v]} plus
+whatever is classified as space in the Unicode character properties
+database.
 
-\item[\code{\e S}]Matches any non-whitespace character; this is
-equivalent to the set \regexp{[\textasciicircum\ \e t\e n\e r\e f\e v]}.
+\item[\code{\e S}]When the \constant{LOCALE} and \constant{UNICODE}
+flags are not specified, matches any non-whitespace character; this is
+equivalent to the set \regexp{[\textasciicircum\ \e t\e n\e r\e f\e v]}
+With \constant{LOCALE}, it will match any character not in this set,
+and not defined as space in the current locale. If \constant{UNICODE}
+is set, this will match anything other than \regexp{[ \e t\e n\e r\e f\e v]}
+and characters marked as space in the Unicode character properties database.
 
 \item[\code{\e w}]When the \constant{LOCALE} and \constant{UNICODE}
 flags are not specified, matches any alphanumeric character and the
@@ -468,8 +484,8 @@
 
 \begin{datadesc}{L}
 \dataline{LOCALE}
-Make \regexp{\e w}, \regexp{\e W}, \regexp{\e b}, and
-\regexp{\e B} dependent on the current locale.
+Make \regexp{\e w}, \regexp{\e W}, \regexp{\e b}, \regexp{\e B},
+\regexp{\e s} and \regexp{\e S} dependent on the current locale.
 \end{datadesc}
 
 \begin{datadesc}{M}
@@ -493,8 +509,9 @@
 
 \begin{datadesc}{U}
 \dataline{UNICODE}
-Make \regexp{\e w}, \regexp{\e W}, \regexp{\e b}, and
-\regexp{\e B} dependent on the Unicode character properties database.
+Make \regexp{\e w}, \regexp{\e W}, \regexp{\e b}, \regexp{\e B},
+\regexp{\e d}, \regexp{\e D}, \regexp{\e s} and \regexp{\e S}
+dependent on the Unicode character properties database.
 \versionadded{2.0}
 \end{datadesc}
 

Index: libsets.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsets.tex,v
retrieving revision 1.11.6.2
retrieving revision 1.11.6.3
diff -u -d -r1.11.6.2 -r1.11.6.3
--- libsets.tex	7 Jan 2005 06:57:27 -0000	1.11.6.2
+++ libsets.tex	16 Oct 2005 05:23:57 -0000	1.11.6.3
@@ -30,7 +30,10 @@
 abstract class useful for determining whether something is a set:
 \code{isinstance(\var{obj}, BaseSet)}.
 
-The set classes are implemented using dictionaries.  As a result, sets
+The set classes are implemented using dictionaries.  Accordingly, the
+requirements for set elements are the same as those for dictionary keys;
+namely, that the element defines both \method{__eq__} and \method{__hash__}.
+As a result, sets
 cannot contain mutable elements such as lists or dictionaries.
 However, they can contain immutable collections such as tuples or
 instances of \class{ImmutableSet}.  For convenience in implementing
@@ -79,7 +82,7 @@
          {test whether every element in \var{t} is in \var{s}}
 
   \hline
-  \lineiii{\var{s}.union(\var{t})}{\var{s} | \var{t}}
+  \lineiii{\var{s}.union(\var{t})}{\var{s} \textbar{} \var{t}}
          {new set with elements from both \var{s} and \var{t}}
   \lineiii{\var{s}.intersection(\var{t})}{\var{s} \&\ \var{t}}
          {new set with elements common to \var{s} and \var{t}}
@@ -130,8 +133,8 @@
 but not found in \class{ImmutableSet}:
 
 \begin{tableiii}{c|c|l}{code}{Operation}{Equivalent}{Result}
-  \lineiii{\var{s}.union_update(\var{t})}
-         {\var{s} |= \var{t}}
+  \lineiii{\var{s}.update(\var{t})}
+         {\var{s} \textbar= \var{t}}
          {return set \var{s} with elements added from \var{t}}
   \lineiii{\var{s}.intersection_update(\var{t})}
          {\var{s} \&= \var{t}}
@@ -158,12 +161,17 @@
          {remove all elements from set \var{s}}
 \end{tableiii}
 
-Note, the non-operator versions of \method{union_update()},
+Note, the non-operator versions of \method{update()},
 \method{intersection_update()}, \method{difference_update()}, and
 \method{symmetric_difference_update()} will accept any iterable as
 an argument.
 \versionchanged[Formerly all arguments were required to be sets]{2.3.1}
 
+Also note, the module also includes a \method{union_update()} method
+which is an alias for \method{update()}.  The method is included for
+backwards compatibility.  Programmers should prefer the
+\method{update()} method because it is the one supported by the builtin
+\class{set()} and \class{frozenset()} types.
 
 \subsection{Example \label{set-example}}
 
@@ -228,3 +236,28 @@
 where one thread is updating a set while another has temporarily wrapped it
 in \class{_TemporarilyImmutableSet}.  In other words, sets of mutable sets
 are not thread-safe.
+
+
+\subsection{Comparison to the built-in \class{set} types
+            \label{comparison-to-builtin-set}}
+
+The built-in \class{set} and \class{frozenset} types were designed based
+on lessons learned from the \module{sets} module.  The key differences are:
+
+\begin{itemize}
+\item \class{Set} and \class{ImmutableSet} were renamed to \class{set} and
+      \class{frozenset}.
+\item There is no equivalent to \class{BaseSet}.  Instead, use
+      \code{isinstance(x, (set, frozenset))}.
+\item The hash algorithm for the built-ins performs significantly better
+      (fewer collisions) for most datasets.
+\item The built-in versions have more space efficient pickles.
+\item The built-in versions do not have a \method{union_update()} method.
+      Instead, use the \method{update()} method which is equivalent.
+\item The built-in versions do not have a \method{_repr(sorted=True)} method.
+      Instead, use the built-in \function{repr()} and \function{sorted()}
+      functions:  \code{repr(sorted(s))}.
+\item The built-in version does not have a protocol for automatic conversion
+      to immutable.  Many found this feature to be confusing and no one
+      in the community reported having found real uses for it.
+\end{itemize}    

Index: libsha.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsha.tex,v
retrieving revision 1.10.10.1
retrieving revision 1.10.10.2
diff -u -d -r1.10.10.1 -r1.10.10.2
--- libsha.tex	7 Jan 2005 06:57:27 -0000	1.10.10.1
+++ libsha.tex	16 Oct 2005 05:23:58 -0000	1.10.10.2
@@ -5,6 +5,8 @@
 \modulesynopsis{NIST's secure hash algorithm, SHA.}
 \sectionauthor{Fred L. Drake, Jr.}{fdrake at acm.org}
 
+\deprecated{2.5}{Use the \refmodule{hashlib} module instead.}
+
 
 This module implements the interface to NIST's\index{NIST} secure hash 
 algorithm,\index{Secure Hash Algorithm} known as SHA-1.  SHA-1 is an

Index: libshelve.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshelve.tex,v
retrieving revision 1.14.26.2
retrieving revision 1.14.26.3
diff -u -d -r1.14.26.2 -r1.14.26.3
--- libshelve.tex	7 Jan 2005 06:57:27 -0000	1.14.26.2
+++ libshelve.tex	16 Oct 2005 05:23:58 -0000	1.14.26.3
@@ -42,6 +42,14 @@
 the transition from dictionary based scripts to those requiring persistent
 storage.
 
+One additional method is supported:
+\begin{methoddesc}[Shelf]{sync}{}
+Write back all entries in the cache if the shelf was opened with
+\var{writeback} set to \var{True}. Also empty the cache and synchronize
+the persistent dictionary on disk, if feasible.  This is called automatically
+when the shelf is closed with \method{close()}.
+\end{methoddesc}
+
 \subsection{Restrictions}
 
 \begin{itemize}

Index: libshlex.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshlex.tex,v
retrieving revision 1.12.20.2
retrieving revision 1.12.20.3
diff -u -d -r1.12.20.2 -r1.12.20.3
--- libshlex.tex	7 Jan 2005 06:57:27 -0000	1.12.20.2
+++ libshlex.tex	16 Oct 2005 05:23:58 -0000	1.12.20.3
@@ -15,6 +15,8 @@
 be useful for writing minilanguages, (for example, in run control
 files for Python applications) or for parsing quoted strings.
 
+\note{The \module{shlex} module currently does not support Unicode input.}
+
 The \module{shlex} module defines the following functions:
 
 \begin{funcdesc}{split}{s\optional{, comments}}

Index: libshutil.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libshutil.tex,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -d -r1.10.2.2 -r1.10.2.3
--- libshutil.tex	7 Jan 2005 06:57:27 -0000	1.10.2.2
+++ libshutil.tex	16 Oct 2005 05:23:58 -0000	1.10.2.3
@@ -67,8 +67,10 @@
 \begin{funcdesc}{copytree}{src, dst\optional{, symlinks}}
   Recursively copy an entire directory tree rooted at \var{src}.  The
   destination directory, named by \var{dst}, must not already exist;
-  it will be created.  Individual files are copied using
-  \function{copy2()}.  If \var{symlinks} is true, symbolic links in
+  it will be created as well as missing parent directories.
+  Permissions and times of directories are copied with \function{copystat()},
+  individual files are copied using \function{copy2()}.  
+  If \var{symlinks} is true, symbolic links in
   the source tree are represented as symbolic links in the new tree;
   if false or omitted, the contents of the linked files are copied to
   the new tree.  If exception(s) occur, an Error is raised
@@ -76,8 +78,14 @@
 
   The source code for this should be considered an example rather than 
   a tool.
-\versionchanged[Error is raised if any exceptions occur during copying,
-rather than printing a message]{2.3}
+
+  \versionchanged[Error is raised if any exceptions occur during copying,
+  rather than printing a message]{2.3}
+
+  \versionchanged[Create intermediate directories needed to create \var{dst},
+  rather than raising an error. Copy permissions and times of directories using
+  \function{copystat()}]{2.5}
+
 \end{funcdesc}
 
 \begin{funcdesc}{rmtree}{path\optional{, ignore_errors\optional{, onerror}}}

Index: libsimplexmlrpc.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsimplexmlrpc.tex,v
retrieving revision 1.3.8.2
retrieving revision 1.3.8.3
diff -u -d -r1.3.8.2 -r1.3.8.3
--- libsimplexmlrpc.tex	7 Jan 2005 06:57:27 -0000	1.3.8.2
+++ libsimplexmlrpc.tex	16 Oct 2005 05:23:58 -0000	1.3.8.3
@@ -55,24 +55,39 @@
   period character.
 \end{methoddesc}
 
-\begin{methoddesc}[SimpleXMLRPCServer]{register_instance}{instance}
+\begin{methoddesc}[SimpleXMLRPCServer]{register_instance}{instance\optional{,
+                                       allow_dotted_names}}
   Register an object which is used to expose method names which have
   not been registered using \method{register_function()}.  If
   \var{instance} contains a \method{_dispatch()} method, it is called
   with the requested method name and the parameters from the request.  Its
-  API is \code{def \method{_dispatch}(self, method, params)} (note tha
+  API is \code{def \method{_dispatch}(self, method, params)} (note that
   \var{params} does not represent a variable argument list).  If it calls an
   underlying function to perform its task, that function is called as
   \code{func(*params)}, expanding the parameter list.
   The return value from \method{_dispatch()} is returned to the client as
   the result.  If
   \var{instance} does not have a \method{_dispatch()} method, it is
-  searched for an attribute matching the name of the requested method;
+  searched for an attribute matching the name of the requested method.
+
+  If the optional \var{allow_dotted_names} argument is true and the
+  instance does not have a \method{_dispatch()} method, then
   if the requested method name contains periods, each component of the
   method name is searched for individually, with the effect that a
   simple hierarchical search is performed.  The value found from this
   search is then called with the parameters from the request, and the
   return value is passed back to the client.
+
+  \begin{notice}[warning]
+  Enabling the \var{allow_dotted_names} option allows intruders to access
+  your module's global variables and may allow intruders to execute
+  arbitrary code on your machine.  Only use this option on a secure,
+  closed network.
+  \end{notice}
+
+  \versionchanged[\var{allow_dotted_names} was added to plug a security hole;
+  prior versions are insecure]{2.3.5, 2.4.1}
+
 \end{methoddesc}
 
 \begin{methoddesc}{register_introspection_functions}{}

Index: libsite.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsite.tex,v
retrieving revision 1.23.2.2
retrieving revision 1.23.2.3
diff -u -d -r1.23.2.2 -r1.23.2.3
--- libsite.tex	7 Jan 2005 06:57:27 -0000	1.23.2.2
+++ libsite.tex	16 Oct 2005 05:23:58 -0000	1.23.2.3
@@ -16,9 +16,9 @@
 It starts by constructing up to four directories from a head and a
 tail part.  For the head part, it uses \code{sys.prefix} and
 \code{sys.exec_prefix}; empty heads are skipped.  For
-the tail part, it uses the empty string (on Macintosh or Windows) or
-it uses first \file{lib/python\shortversion/site-packages} and then
-\file{lib/site-python} (on \UNIX).  For each of the distinct
+the tail part, it uses the empty string (on Windows) or
+\file{lib/python\shortversion/site-packages} (on \UNIX{} and Macintosh)
+and then \file{lib/site-python}.  For each of the distinct
 head-tail combinations, it sees if it refers to an existing directory,
 and if so, adds it to \code{sys.path} and also inspects the newly added 
 path for configuration files.

Index: libsmtplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsmtplib.tex,v
retrieving revision 1.22.2.2
retrieving revision 1.22.2.3
diff -u -d -r1.22.2.2 -r1.22.2.3
--- libsmtplib.tex	7 Jan 2005 06:57:27 -0000	1.22.2.2
+++ libsmtplib.tex	16 Oct 2005 05:23:58 -0000	1.22.2.3
@@ -190,13 +190,14 @@
 \begin{methoddesc}{sendmail}{from_addr, to_addrs, msg\optional{,
                              mail_options, rcpt_options}}
 Send mail.  The required arguments are an \rfc{822} from-address
-string, a list of \rfc{822} to-address strings, and a message string.
-The caller may pass a list of ESMTP options (such as \samp{8bitmime})
-to be used in \samp{MAIL FROM} commands as \var{mail_options}.  ESMTP
-options (such as \samp{DSN} commands) that should be used with all
-\samp{RCPT} commands can be passed as \var{rcpt_options}.  (If you
-need to use different ESMTP options to different recipients you have
-to use the low-level methods such as \method{mail}, \method{rcpt} and
+string, a list of \rfc{822} to-address strings (a bare string will be
+treated as a list with 1 address), and a message string.  The caller
+may pass a list of ESMTP options (such as \samp{8bitmime}) to be used
+in \samp{MAIL FROM} commands as \var{mail_options}.  ESMTP options
+(such as \samp{DSN} commands) that should be used with all \samp{RCPT}
+commands can be passed as \var{rcpt_options}.  (If you need to use
+different ESMTP options to different recipients you have to use the
+low-level methods such as \method{mail}, \method{rcpt} and
 \method{data} to send the message.)
 
 \note{The \var{from_addr} and \var{to_addrs} parameters are

Index: libsocket.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v
retrieving revision 1.68.2.2
retrieving revision 1.68.2.3
diff -u -d -r1.68.2.2 -r1.68.2.3
--- libsocket.tex	7 Jan 2005 06:57:27 -0000	1.68.2.2
+++ libsocket.tex	16 Oct 2005 05:23:58 -0000	1.68.2.3
@@ -7,7 +7,8 @@
 
 This module provides access to the BSD \emph{socket} interface.
 It is available on all modern \UNIX{} systems, Windows, MacOS, BeOS,
-OS/2, and probably additional platforms.
+OS/2, and probably additional platforms.  \note{Some behavior may be
+platform dependent, since calls are made to the operating system socket APIs.}
 
 For an introduction to socket programming (in C), see the following
 papers: \citetitle{An Introductory 4.3BSD Interprocess Communication
@@ -202,8 +203,8 @@
 host.  To find the fully qualified name, the hostname returned by
 \function{gethostbyaddr()} is checked, then aliases for the host, if
 available.  The first name which includes a period is selected.  In
-case no fully qualified domain name is available, the hostname is
-returned.
+case no fully qualified domain name is available, the hostname as
+returned by \function{gethostname()} is returned.
 \versionadded{2.0}
 \end{funcdesc}
 

Index: libsocksvr.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocksvr.tex,v
retrieving revision 1.14.24.2
retrieving revision 1.14.24.3
diff -u -d -r1.14.24.2 -r1.14.24.3
--- libsocksvr.tex	7 Jan 2005 06:57:27 -0000	1.14.24.2
+++ libsocksvr.tex	16 Oct 2005 05:23:58 -0000	1.14.24.3
@@ -52,10 +52,86 @@
 
 \setindexsubitem{(SocketServer protocol)}
 
+\subsection{Server Creation Notes}
+
+There are five classes in an inheritance diagram, four of which represent
+synchronous servers of four types:
+
+\begin{verbatim}
+        +------------+
+        | BaseServer |
+        +------------+
+              |
+              v
+        +-----------+        +------------------+
+        | TCPServer |------->| UnixStreamServer |
+        +-----------+        +------------------+
+              |
+              v
+        +-----------+        +--------------------+
+        | UDPServer |------->| UnixDatagramServer |
+        +-----------+        +--------------------+
+\end{verbatim}
+
+Note that \class{UnixDatagramServer} derives from \class{UDPServer}, not
+from \class{UnixStreamServer} -- the only difference between an IP and a
+Unix stream server is the address family, which is simply repeated in both
+unix server classes.
+
+Forking and threading versions of each type of server can be created using
+the \class{ForkingMixIn} and \class{ThreadingMixIn} mix-in classes.  For
+instance, a threading UDP server class is created as follows:
+
+\begin{verbatim}
+    class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass
+\end{verbatim}
+
+The mix-in class must come first, since it overrides a method defined in
+\class{UDPServer}.  Setting the various member variables also changes the
+behavior of the underlying server mechanism.
+
+To implement a service, you must derive a class from
+\class{BaseRequestHandler} and redefine its \method{handle()} method.  You
+can then run various versions of the service by combining one of the server
+classes with your request handler class.  The request handler class must be
+different for datagram or stream services.  This can be hidden by using the
+handler subclasses \class{StreamRequestHandler} or \class{DatagramRequestHandler}.
+
+Of course, you still have to use your head!  For instance, it makes no sense
+to use a forking server if the service contains state in memory that can be
+modified by different requests, since the modifications in the child process
+would never reach the initial state kept in the parent process and passed to
+each child.  In this case, you can use a threading server, but you will
+probably have to use locks to protect the integrity of the shared data.
+
+On the other hand, if you are building an HTTP server where all data is
+stored externally (for instance, in the file system), a synchronous class
+will essentially render the service "deaf" while one request is being
+handled -- which may be for a very long time if a client is slow to receive
+all the data it has requested.  Here a threading or forking server is
+appropriate.
+
+In some cases, it may be appropriate to process part of a request
+synchronously, but to finish processing in a forked child depending on the
+request data.  This can be implemented by using a synchronous server and
+doing an explicit fork in the request handler class \method{handle()}
+method.
+
+Another approach to handling multiple simultaneous requests in an
+environment that supports neither threads nor \function{fork()} (or where
+these are too expensive or inappropriate for the service) is to maintain an
+explicit table of partially finished requests and to use \function{select()}
+to decide which request to work on next (or whether to handle a new incoming
+request).  This is particularly important for stream services where each
+client can potentially be connected for a long time (if threads or
+subprocesses cannot be used).
+
 %XXX should data and methods be intermingled, or separate?
 % how should the distinction between class and instance variables be
 % drawn?
 
+\subsection{Server Objects}
+
 \begin{funcdesc}{fileno}{}
 Return an integer file descriptor for the socket on which the server
 is listening.  This function is most commonly passed to
@@ -160,7 +236,8 @@
 % instance variables, adding new network families?
 
 \begin{funcdesc}{server_activate}{}
-Called by the server's constructor to activate the server.
+Called by the server's constructor to activate the server.  The default
+behavior just \method{listen}s to the server's socket.
 May be overridden.
 \end{funcdesc}
 
@@ -176,6 +253,8 @@
 The default implementation always returns \constant{True}.
 \end{funcdesc}
 
+\subsection{RequestHandler Objects}
+
 The request handler class must define a new \method{handle()} method,
 and can override any of the following methods.  A new instance is
 created for each request.
@@ -189,6 +268,7 @@
 
 \begin{funcdesc}{handle}{}
 This function must do all the work required to service a request.
+The default implementation does nothing.
 Several instance attributes are available to it; the request is
 available as \member{self.request}; the client address as
 \member{self.client_address}; and the server instance as
@@ -198,11 +278,10 @@
 The type of \member{self.request} is different for datagram or stream
 services.  For stream services, \member{self.request} is a socket
 object; for datagram services, \member{self.request} is a string.
-However, this can be hidden by using the mix-in request handler
-classes
+However, this can be hidden by using the  request handler subclasses
 \class{StreamRequestHandler} or \class{DatagramRequestHandler}, which
 override the \method{setup()} and \method{finish()} methods, and
-provides \member{self.rfile} and \member{self.wfile} attributes.
+provide \member{self.rfile} and \member{self.wfile} attributes.
 \member{self.rfile} and \member{self.wfile} can be read or written,
 respectively, to get the request data or return data to the client.
 \end{funcdesc}

Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.98.2.2
retrieving revision 1.98.2.3
diff -u -d -r1.98.2.2 -r1.98.2.3
--- libstdtypes.tex	7 Jan 2005 06:57:27 -0000	1.98.2.2
+++ libstdtypes.tex	16 Oct 2005 05:23:58 -0000	1.98.2.3
@@ -72,7 +72,9 @@
 \index{False}
 \index{True}
 
-\subsection{Boolean Operations \label{boolean}}
+\subsection{Boolean Operations ---
+	    \keyword{and}, \keyword{or}, \keyword{not}
+	    \label{boolean}}
 
 These are the Boolean operations, ordered by ascending priority:
 \indexii{Boolean}{operations}
@@ -173,7 +175,9 @@
 only by sequence types (below).
 
 
-\subsection{Numeric Types \label{typesnumeric}}
+\subsection{Numeric Types ---
+	    \class{int}, \class{float}, \class{long}, \class{complex}
+	    \label{typesnumeric}}
 
 There are four distinct numeric types: \dfn{plain integers},
 \dfn{long integers}, 
@@ -256,7 +260,7 @@
   \lineiii{float(\var{x})}{\var{x} converted to floating point}{}
   \lineiii{complex(\var{re},\var{im})}{a complex number with real part \var{re}, imaginary part \var{im}.  \var{im} defaults to zero.}{}
   \lineiii{\var{c}.conjugate()}{conjugate of the complex number \var{c}}{}
-  \lineiii{divmod(\var{x}, \var{y})}{the pair \code{(\var{x} / \var{y}, \var{x} \%{} \var{y})}}{(3)(4)}
+  \lineiii{divmod(\var{x}, \var{y})}{the pair \code{(\var{x} // \var{y}, \var{x} \%{} \var{y})}}{(3)(4)}
   \lineiii{pow(\var{x}, \var{y})}{\var{x} to the power \var{y}}{}
   \lineiii{\var{x} ** \var{y}}{\var{x} to the power \var{y}}{}
 \end{tableiii}
@@ -405,7 +409,10 @@
 supplying the \method{__iter__()} and \method{next()} methods.
 
 
-\subsection{Sequence Types \label{typesseq}}
+\subsection{Sequence Types ---
+	    \class{str}, \class{unicode}, \class{list},
+	    \class{tuple}, \class{buffer}, \class{xrange}
+	    \label{typesseq}}
 
 There are six sequence types: strings, Unicode strings, lists,
 tuples, buffers, and xrange objects.
@@ -699,11 +706,17 @@
 \end{methoddesc}
 
 \begin{methoddesc}[string]{lstrip}{\optional{chars}}
-Return a copy of the string with leading characters removed.  If
-\var{chars} is omitted or \code{None}, whitespace characters are
-removed.  If given and not \code{None}, \var{chars} must be a string;
-the characters in the string will be stripped from the beginning of
-the string this method is called on.
+Return a copy of the string with leading characters removed.  The
+\var{chars} argument is a string specifying the set of characters
+to be removed.  If omitted or \code{None}, the \var{chars} argument
+defaults to removing whitespace.  The \var{chars} argument is not
+a prefix; rather, all combinations of its values are stripped:
+\begin{verbatim}
+    >>> '   spacious   '.lstrip()
+    'spacious   '
+    >>> 'www.example.com'.lstrip('cmowz.')
+    'example.com'
+\end{verbatim}
 \versionchanged[Support for the \var{chars} argument]{2.2.2}
 \end{methoddesc}
 
@@ -738,16 +751,24 @@
 Return a list of the words in the string, using \var{sep} as the
 delimiter string.  If \var{maxsplit} is given, at most \var{maxsplit}
 splits are done, the \emph{rightmost} ones.  If \var{sep} is not specified
-or \code{None}, any whitespace string is a separator.
+or \code{None}, any whitespace string is a separator.  Except for splitting
+from the right, \method{rsplit()} behaves like \method{split()} which
+is described in detail below.
 \versionadded{2.4}
 \end{methoddesc}
 
 \begin{methoddesc}[string]{rstrip}{\optional{chars}}
-Return a copy of the string with trailing characters removed.  If
-\var{chars} is omitted or \code{None}, whitespace characters are
-removed.  If given and not \code{None}, \var{chars} must be a string;
-the characters in the string will be stripped from the end of the
-string this method is called on.
+Return a copy of the string with trailing characters removed.  The
+\var{chars} argument is a string specifying the set of characters
+to be removed.  If omitted or \code{None}, the \var{chars} argument
+defaults to removing whitespace.  The \var{chars} argument is not
+a suffix; rather, all combinations of its values are stripped:
+\begin{verbatim}
+    >>> '   spacious   '.rstrip()
+    '   spacious'
+    >>> 'mississippi'.rstrip('ipz')
+    'mississ'
+\end{verbatim}
 \versionchanged[Support for the \var{chars} argument]{2.2.2}
 \end{methoddesc}
 
@@ -755,21 +776,23 @@
 Return a list of the words in the string, using \var{sep} as the
 delimiter string.  If \var{maxsplit} is given, at most \var{maxsplit}
 splits are done. (thus, the list will have at most \code{\var{maxsplit}+1}
-elements).  If \var{maxsplit} is not specified or is zero, then there
+elements).  If \var{maxsplit} is not specified, then there
 is no limit on the number of splits (all possible splits are made).
 Consecutive delimiters are not grouped together and are
 deemed to delimit empty strings (for example, \samp{'1,,2'.split(',')}
 returns \samp{['1', '', '2']}).  The \var{sep} argument may consist of
 multiple characters (for example, \samp{'1, 2, 3'.split(', ')} returns
 \samp{['1', '2', '3']}).  Splitting an empty string with a specified
-separator returns an empty list.
+separator returns \samp{['']}.
 
 If \var{sep} is not specified or is \code{None}, a different splitting
-algorithm is applied.  Words are separated by arbitrary length strings of
-whitespace characters (spaces, tabs, newlines, returns, and formfeeds).
-Consecutive whitespace delimiters are treated as a single delimiter
-(\samp{'1   2  3'.split()} returns \samp{['1', '2', '3']}).  Splitting an
-empty string returns \samp{['']}.
+algorithm is applied.  First, whitespace characters (spaces, tabs,
+newlines, returns, and formfeeds) are stripped from both ends.  Then,
+words are separated by arbitrary length strings of whitespace
+characters. Consecutive whitespace delimiters are treated as a single
+delimiter (\samp{'1  2  3'.split()} returns \samp{['1', '2', '3']}).
+Splitting an empty string or a string consisting of just whitespace
+returns an empty list.
 \end{methoddesc}
 
 \begin{methoddesc}[string]{splitlines}{\optional{keepends}}
@@ -787,11 +810,17 @@
 \end{methoddesc}
 
 \begin{methoddesc}[string]{strip}{\optional{chars}}
-Return a copy of the string with leading and trailing characters
-removed.  If \var{chars} is omitted or \code{None}, whitespace
-characters are removed.  If given and not \code{None}, \var{chars}
-must be a string; the characters in the string will be stripped from
-the both ends of the string this method is called on.
+Return a copy of the string with the leading and trailing characters
+removed.  The \var{chars} argument is a string specifying the set of
+characters to be removed.  If omitted or \code{None}, the \var{chars}
+argument defaults to removing whitespace.  The \var{chars} argument is not
+a prefix or suffix; rather, all combinations of its values are stripped:
+\begin{verbatim}
+    >>> '   spacious   '.strip()
+    'spacious'
+    >>> 'www.example.com'.strip('cmowz.')
+    'example'
+\end{verbatim}
 \versionchanged[Support for the \var{chars} argument]{2.2.2}
 \end{methoddesc}
 
@@ -1071,7 +1100,7 @@
   no longer works in Python 2.0.  Use of this misfeature has been
   deprecated since Python 1.4.
 
-\item[(3)] Raises an exception when \var{x} is not a list object.
+\item[(3)] \var{x} can be any iterable object.
 
 \item[(4)] Raises \exception{ValueError} when \var{x} is not found in
   \var{s}. When a negative index is passed as the second or third parameter
@@ -1135,7 +1164,9 @@
   that the list has been mutated during a sort.
 \end{description}
 
-\subsection{Set Types \label{types-set}}
+\subsection{Set Types ---
+	    \class{set}, \class{frozenset}
+	    \label{types-set}}
 \obindex{set}
 
 A \dfn{set} object is an unordered collection of immutable values.
@@ -1216,6 +1247,9 @@
 Since sets only define partial ordering (subset relationships), the output
 of the \method{list.sort()} method is undefined for lists of sets.
 
+Set elements are like dictionary keys; they need to define both
+\method{__hash__} and \method{__eq__} methods.
+
 Binary operations that mix \class{set} instances with \class{frozenset}
 return the type of the first operand.  For example:
 \samp{frozenset('ab') | set('bc')} returns an instance of \class{frozenset}.
@@ -1257,8 +1291,18 @@
 \method{symmetric_difference_update()} methods will accept any iterable
 as an argument.
 
+The design of the set types was based on lessons learned from the
+\module{sets} module.
+     
+\begin{seealso}     
+  \seelink{comparison-to-builtin-set.html}
+          {Comparison to the built-in set types}
+          {Differences between the \module{sets} module and the
+           built-in set types.}					      
+\end{seealso}
+     
 
-\subsection{Mapping Types \label{typesmapping}}
+\subsection{Mapping Types --- \class{dict} \label{typesmapping}}
 \obindex{mapping}
 \obindex{dictionary}
 
@@ -1391,7 +1435,8 @@
 the dictionary as the value of \var{k}. \var{x} defaults to \var{None}.
 
 \item[(6)] \function{popitem()} is useful to destructively iterate
-over a dictionary, as often used in set algorithms.
+over a dictionary, as often used in set algorithms.  If the dictionary
+is empty, calling \function{popitem()} raises a \exception{KeyError}.
 
 \item[(7)] \function{fromkeys()} is a class method that returns a
 new dictionary. \var{value} defaults to \code{None}.  \versionadded{2.3}

Index: libstdwin.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdwin.tex,v
retrieving revision 1.25.10.1
retrieving revision 1.25.10.2
diff -u -d -r1.25.10.1 -r1.25.10.2
--- libstdwin.tex	7 Jan 2005 06:57:28 -0000	1.25.10.1
+++ libstdwin.tex	16 Oct 2005 05:23:58 -0000	1.25.10.2
@@ -114,7 +114,7 @@
 \end{funcdesc}
 
 \begin{funcdesc}{getscrmm}{}
-Return the screen size in millimeters.
+Return the screen size in millimetres.
 \end{funcdesc}
 
 \begin{funcdesc}{fetchcolor}{colorname}

Index: libstringio.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstringio.tex,v
retrieving revision 1.6.20.2
retrieving revision 1.6.20.3
diff -u -d -r1.6.20.2 -r1.6.20.3
--- libstringio.tex	7 Jan 2005 06:57:28 -0000	1.6.20.2
+++ libstringio.tex	16 Oct 2005 05:23:58 -0000	1.6.20.3
@@ -14,6 +14,7 @@
 When a \class{StringIO} object is created, it can be initialized
 to an existing string by passing the string to the constructor.
 If no string is given, the \class{StringIO} will start empty.
+In both cases, the initial file position starts at zero.
 
 The \class{StringIO} object can accept either Unicode or 8-bit
 strings, but mixing the two may take some care.  If both are used,

Index: libsubprocess.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsubprocess.tex,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -d -r1.5.2.1 -r1.5.2.2
--- libsubprocess.tex	7 Jan 2005 06:57:28 -0000	1.5.2.1
+++ libsubprocess.tex	16 Oct 2005 05:23:58 -0000	1.5.2.2
@@ -189,7 +189,7 @@
 \begin{methoddesc}{communicate}{input=None}
 Interact with process: Send data to stdin.  Read data from stdout and
 stderr, until end-of-file is reached.  Wait for process to terminate.
-The optional \var{stdin} argument should be a string to be sent to the
+The optional \var{input} argument should be a string to be sent to the
 child process, or \code{None}, if no data should be sent to the child.
 
 communicate() returns a tuple (stdout, stderr).
@@ -374,7 +374,7 @@
 \begin{verbatim}
 (child_stdout, child_stdin) = popen2.popen2("somestring", bufsize, mode)
 ==>
-p = Popen(["somestring"], shell=True, bufsize=bufsize
+p = Popen(["somestring"], shell=True, bufsize=bufsize,
           stdin=PIPE, stdout=PIPE, close_fds=True)
 (child_stdout, child_stdin) = (p.stdout, p.stdin)
 \end{verbatim}

Index: libtarfile.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtarfile.tex,v
retrieving revision 1.1.6.2
retrieving revision 1.1.6.3
diff -u -d -r1.1.6.2 -r1.1.6.3
--- libtarfile.tex	7 Jan 2005 06:57:28 -0000	1.1.6.2
+++ libtarfile.tex	16 Oct 2005 05:23:58 -0000	1.1.6.3
@@ -32,7 +32,7 @@
     it defaults to \code{'r'}. Here is a full list of mode combinations:
 
     \begin{tableii}{c|l}{code}{mode}{action}
-    \lineii{'r'}{Open for reading with transparent compression (recommended).}
+    \lineii{'r' or 'r:*'}{Open for reading with transparent compression (recommended).}
     \lineii{'r:'}{Open for reading exclusively without compression.}
     \lineii{'r:gz'}{Open for reading with gzip compression.}
     \lineii{'r:bz2'}{Open for reading with bzip2 compression.}
@@ -65,6 +65,7 @@
     (section~\ref{tar-examples}).  The currently possible modes:
 
     \begin{tableii}{c|l}{code}{Mode}{Action}
+    \lineii{'r|*'}{Open a \emph{stream} of tar blocks for reading with transparent compression.}
     \lineii{'r|'}{Open a \emph{stream} of uncompressed tar blocks for reading.}
     \lineii{'r|gz'}{Open a gzip compressed \emph{stream} for reading.}
     \lineii{'r|bz2'}{Open a bzip2 compressed \emph{stream} for reading.}
@@ -127,8 +128,8 @@
     \seemodule{zipfile}{Documentation of the \refmodule{zipfile}
     standard module.}
 
-    \seetitle[http://www.gnu.org/manual/tar/html_chapter/tar_8.html\#SEC118]
-    {GNU tar manual, Standard Section}{Documentation for tar archive files,
+    \seetitle[http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html\#SEC134]
+    {GNU tar manual, Basic Tar Format}{Documentation for tar archive files,
     including GNU tar extensions.}
 \end{seealso}
 
@@ -196,12 +197,29 @@
     more available.
 \end{methoddesc}
 
+\begin{methoddesc}{extractall}{\optional{path\optional{, members}}}
+    Extract all members from the archive to the current working directory
+    or directory \var{path}. If optional \var{members} is given, it must be
+    a subset of the list returned by \method{getmembers()}.
+    Directory informations like owner, modification time and permissions are
+    set after all members have been extracted. This is done to work around two
+    problems: A directory's modification time is reset each time a file is
+    created in it. And, if a directory's permissions do not allow writing,
+    extracting files to it will fail.
+    \versionadded{2.5}
+\end{methoddesc}
+
 \begin{methoddesc}{extract}{member\optional{, path}}
     Extract a member from the archive to the current working directory,
     using its full name. Its file information is extracted as accurately as
     possible.
     \var{member} may be a filename or a \class{TarInfo} object.
     You can specify a different directory using \var{path}.
+    \begin{notice}
+    Because the \method{extract()} method allows random access to a tar
+    archive there are some issues you must take care of yourself. See the
+    description for \method{extractall()} above.
+    \end{notice}
 \end{methoddesc}
 
 \begin{methoddesc}{extractfile}{member}
@@ -281,7 +299,7 @@
 \begin{memberdesc}{debug=0}
     To be set from \code{0} (no debug messages; the default) up to
     \code{3} (all debug messages). The messages are written to
-    \code{sys.stdout}.
+    \code{sys.stderr}.
 \end{memberdesc}
 
 \begin{memberdesc}{errorlevel}
@@ -416,6 +434,14 @@
 
 \subsection{Examples \label{tar-examples}}
 
+How to extract an entire tar archive to the current working directory:
+\begin{verbatim}
+import tarfile
+tar = tarfile.open("sample.tar.gz")
+tar.extractall()
+tar.close()
+\end{verbatim}
+
 How to create an uncompressed tar archive from a list of filenames:
 \begin{verbatim}
 import tarfile

Index: libtempfile.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtempfile.tex,v
retrieving revision 1.17.8.2
retrieving revision 1.17.8.3
diff -u -d -r1.17.8.2 -r1.17.8.3
--- libtempfile.tex	7 Jan 2005 06:57:28 -0000	1.17.8.2
+++ libtempfile.tex	16 Oct 2005 05:23:58 -0000	1.17.8.3
@@ -146,7 +146,6 @@
 \item The directory named by the \envvar{TMP} environment variable.
 \item A platform-specific location:
     \begin{itemize}
-    \item On Macintosh, the \file{Temporary Items} folder.
     \item On RiscOS, the directory named by the
           \envvar{Wimp\$ScrapDir} environment variable.
     \item On Windows, the directories

Index: libthread.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libthread.tex,v
retrieving revision 1.25.2.2
retrieving revision 1.25.2.3
diff -u -d -r1.25.2.2 -r1.25.2.3
--- libthread.tex	7 Jan 2005 06:57:29 -0000	1.25.2.2
+++ libthread.tex	16 Oct 2005 05:23:58 -0000	1.25.2.3
@@ -81,11 +81,11 @@
 Without the optional argument, this method acquires the lock
 unconditionally, if necessary waiting until it is released by another
 thread (only one thread at a time can acquire a lock --- that's their
-reason for existence), and returns \code{None}.  If the integer
+reason for existence).  If the integer
 \var{waitflag} argument is present, the action depends on its
 value: if it is zero, the lock is only acquired if it can be acquired
 immediately without waiting, while if it is nonzero, the lock is
-acquired unconditionally as before.  If an argument is present, the
+acquired unconditionally as before.  The
 return value is \code{True} if the lock is acquired successfully,
 \code{False} if not.
 \end{methoddesc}

Index: libthreading.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libthreading.tex,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -d -r1.12.2.2 -r1.12.2.3
--- libthreading.tex	7 Jan 2005 06:57:29 -0000	1.12.2.2
+++ libthreading.tex	16 Oct 2005 05:23:58 -0000	1.12.2.3
@@ -167,8 +167,7 @@
 Acquire a lock, blocking or non-blocking.
 
 When invoked without arguments, block until the lock is
-unlocked, then set it to locked, and return.  There is no
-return value in this case.
+unlocked, then set it to locked, and return true.  
 
 When invoked with the \var{blocking} argument set to true, do the
 same thing as when called without arguments, and return true.
@@ -595,7 +594,12 @@
 
 When the \var{timeout} argument is present and not \code{None}, it
 should be a floating point number specifying a timeout for the
-operation in seconds (or fractions thereof).
+operation in seconds (or fractions thereof). As \method{join()} always 
+returns \code{None}, you must call \method{isAlive()} to decide whether 
+a timeout happened.
+
+When the \var{timeout} argument is not present or \code{None}, the
+operation will block until the thread terminates.
 
 A thread can be \method{join()}ed many times.
 

Index: libtokenize.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtokenize.tex,v
retrieving revision 1.5
retrieving revision 1.5.20.1
diff -u -d -r1.5 -r1.5.20.1
--- libtokenize.tex	29 Jun 2001 23:51:07 -0000	1.5
+++ libtokenize.tex	16 Oct 2005 05:23:58 -0000	1.5.20.1
@@ -45,6 +45,9 @@
   provides the same interface as the \method{readline()} method of
   built-in file objects (see section~\ref{bltin-file-objects}).  Each
   call to the function should return one line of input as a string.
+  Alternately, \var{readline} may be a callable object that signals
+  completion by raising \exception{StopIteration}.
+  \versionchanged[Added StopIteration support]{2.5}
 
   The second parameter, \var{tokeneater}, must also be a callable
   object.  It is called once for each token, with five arguments,
@@ -65,3 +68,52 @@
   are generated when a logical line of code is continued over multiple
   physical lines.
 \end{datadesc}
+
+Another function is provided to reverse the tokenization process.
+This is useful for creating tools that tokenize a script, modify
+the token stream, and write back the modified script.
+
+\begin{funcdesc}{untokenize}{iterable}
+  Converts tokens back into Python source code.  The \var{iterable}
+  must return sequences with at least two elements, the token type and
+  the token string.  Any additional sequence elements are ignored.
+
+  The reconstructed script is returned as a single string.  The
+  result is guaranteed to tokenize back to match the input so that
+  the conversion is lossless and round-trips are assured.  The
+  guarantee applies only to the token type and token string as
+  the spacing between tokens (column positions) may change.
+  \versionadded{2.5}
+\end{funcdesc}
+
+Example of a script re-writer that transforms float literals into
+Decimal objects:
+\begin{verbatim}
+def decistmt(s):
+    """Substitute Decimals for floats in a string of statements.
+
+    >>> from decimal import Decimal
+    >>> s = 'print +21.3e-5*-.1234/81.7'
+    >>> decistmt(s)
+    "print +Decimal ('21.3e-5')*-Decimal ('.1234')/Decimal ('81.7')"
+
+    >>> exec(s)
+    -3.21716034272e-007
+    >>> exec(decistmt(s))
+    -3.217160342717258261933904529E-7
+
+    """
+    result = []
+    g = generate_tokens(StringIO(s).readline)   # tokenize the string
+    for toknum, tokval, _, _, _  in g:
+        if toknum == NUMBER and '.' in tokval:  # replace NUMBER tokens
+            result.extend([
+                (NAME, 'Decimal'),
+                (OP, '('),
+                (STRING, repr(tokval)),
+                (OP, ')')
+            ])
+        else:
+            result.append((toknum, tokval))
+    return untokenize(result)
+\end{verbatim}

Index: libunicodedata.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunicodedata.tex,v
retrieving revision 1.3.24.2
retrieving revision 1.3.24.3
diff -u -d -r1.3.24.2 -r1.3.24.3
--- libunicodedata.tex	7 Jan 2005 06:57:29 -0000	1.3.24.2
+++ libunicodedata.tex	16 Oct 2005 05:23:58 -0000	1.3.24.3
@@ -18,7 +18,7 @@
 
 The module uses the same names and symbols as defined by the
 UnicodeData File Format 3.2.0 (see
-\url{http://www.unicode.org/Public/UNIDATA/UnicodeData.html}).  It
+\url{http://www.unicode.org/Public/3.2-Update/UnicodeData-3.2.0.html}).  It
 defines the following functions:
 
 \begin{funcdesc}{lookup}{name}

Index: liburllib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v
retrieving revision 1.43.2.2
retrieving revision 1.43.2.3
diff -u -d -r1.43.2.2 -r1.43.2.3
--- liburllib.tex	7 Jan 2005 06:57:29 -0000	1.43.2.2
+++ liburllib.tex	16 Oct 2005 05:23:58 -0000	1.43.2.3
@@ -97,7 +97,7 @@
 
 \begin{verbatim}
 # Use http://www.someproxy.com:3128 for http proxying
-proxies = proxies={'http': 'http://www.someproxy.com:3128'}
+proxies = {'http': 'http://www.someproxy.com:3128'}
 filehandle = urllib.urlopen(some_url, proxies=proxies)
 # Don't use any proxies
 filehandle = urllib.urlopen(some_url, proxies={})
@@ -142,6 +142,25 @@
 (normally the request type is \code{GET}).  The \var{data} argument
 must in standard \mimetype{application/x-www-form-urlencoded} format;
 see the \function{urlencode()} function below.
+
+\versionchanged[
+\function{urlretrieve()} will raise \exception{ContentTooShortError}
+when it detects that the amount of data available 
+was less than the expected amount (which is the size reported by a 
+\var{Content-Length} header). This can occur, for example, when the 
+download is interrupted.
+
+The \var{Content-Length} is treated as a lower bound: if there's more data 
+to read, urlretrieve reads more data, but if less data is available, 
+it raises the exception.
+
+You can still retrieve the downloaded data in this case, it is stored 
+in the \member{content} attribute of the exception instance.
+
+If no \var{Content-Length} header was supplied, urlretrieve can
+not check the size of the data it has downloaded, and just returns it. 
+In this case you just have to assume that the download was successful]{2.5}
+
 \end{funcdesc}
 
 \begin{datadesc}{_urlopener}
@@ -160,9 +179,7 @@
 import urllib
 
 class AppURLopener(urllib.FancyURLopener):
-    def __init__(self, *args):
-        self.version = "App/1.7"
-        urllib.FancyURLopener.__init__(self, *args)
+    version = "App/1.7"
 
 urllib._urlopener = AppURLopener()
 \end{verbatim}
@@ -243,9 +260,9 @@
 \mailheader{User-Agent} header of \samp{urllib/\var{VVV}}, where
 \var{VVV} is the \module{urllib} version number.  Applications can
 define their own \mailheader{User-Agent} header by subclassing
-\class{URLopener} or \class{FancyURLopener} and setting the instance
-attribute \member{version} to an appropriate string value before the
-\method{open()} method is called.
+\class{URLopener} or \class{FancyURLopener} and setting the class
+attribute \member{version} to an appropriate string value in the
+subclass definition.
 
 The optional \var{proxies} parameter should be a dictionary mapping
 scheme names to proxy URLs, where an empty dictionary turns proxies
@@ -285,6 +302,15 @@
 if needed.}
 \end{classdesc}
 
+\begin{excclassdesc}{ContentTooShortError}{msg\optional{, content}}
+This exception is raised when the \function{urlretrieve()} function
+detects that the amount of the downloaded data is less than the 
+expected amount (given by the \var{Content-Length} header). The
+\member{content} attribute stores the downloaded (and supposedly
+truncated) data.
+\versionadded{2.5}
+\end{excclassdesc}
+
 Restrictions:
 
 \begin{itemize}
@@ -319,7 +345,7 @@
 \item
 The data returned by \function{urlopen()} or \function{urlretrieve()}
 is the raw data returned by the server.  This may be binary data
-(e.g. an image), plain text or (for example) HTML\index{HTML}.  The
+(such as an image), plain text or (for example) HTML\index{HTML}.  The
 HTTP\indexii{HTTP}{protocol} protocol provides type information in the
 reply header, which can be inspected by looking at the
 \mailheader{Content-Type} header.  For the

Index: liburllib2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib2.tex,v
retrieving revision 1.6.10.2
retrieving revision 1.6.10.3
diff -u -d -r1.6.10.2 -r1.6.10.3
--- liburllib2.tex	7 Jan 2005 06:57:29 -0000	1.6.10.2
+++ liburllib2.tex	16 Oct 2005 05:23:58 -0000	1.6.10.3
@@ -71,6 +71,15 @@
 \end{funcdesc}
 
 
+The following attribute is defined:
+
+\begin{datadesc}{httpresponses}
+A mapping between HTTP status codes and the W3C names.
+
+Example: \code{urllib2.httpresponses[404]} is \code{'Not Found'}.
+\versionadded{2.5}
+\end{datadesc}
+
 The following exceptions are raised as appropriate:
 
 \begin{excdesc}{URLError}
@@ -254,8 +263,8 @@
 
 \begin{methoddesc}[Request]{get_method}{}
 Return a string indicating the HTTP request method.  This is only
-meaningful for HTTP requests, and currently always takes one of the
-values ("GET", "POST").
+meaningful for HTTP requests, and currently always returns
+\code{'GET'} or \code{'POST'}.
 \end{methoddesc}
 
 \begin{methoddesc}[Request]{has_data}{}

Index: liburlparse.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburlparse.tex,v
retrieving revision 1.20.8.1
retrieving revision 1.20.8.2
diff -u -d -r1.20.8.1 -r1.20.8.2
--- liburlparse.tex	28 Apr 2003 17:34:09 -0000	1.20.8.1
+++ liburlparse.tex	16 Oct 2005 05:23:58 -0000	1.20.8.2
@@ -69,9 +69,9 @@
 params from the URL.  This should generally be used instead of
 \function{urlparse()} if the more recent URL syntax allowing
 parameters to be applied to each segment of the \var{path} portion of
-the URL (see \rfc{2396}).  A separate function is needed to separate
-the path segments and parameters.  This function returns a 5-tuple:
-(addressing scheme, network location, path, query, fragment
+the URL (see \rfc{2396}) is wanted.  A separate function is needed to
+separate the path segments and parameters.  This function returns a
+5-tuple: (addressing scheme, network location, path, query, fragment
 identifier).
 \versionadded{2.2}
 \end{funcdesc}

Index: libuserdict.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v
retrieving revision 1.21.2.2
retrieving revision 1.21.2.3
diff -u -d -r1.21.2.2 -r1.21.2.3
--- libuserdict.tex	7 Jan 2005 06:57:29 -0000	1.21.2.2
+++ libuserdict.tex	16 Oct 2005 05:23:58 -0000	1.21.2.3
@@ -21,18 +21,24 @@
 The \module{UserDict} module defines the \class{UserDict} class
 and \class{DictMixin}:
 
-\begin{classdesc}{UserDict}{\optional{initialdata}}
-Class that simulates a dictionary.  The instance's
-contents are kept in a regular dictionary, which is accessible via the
-\member{data} attribute of \class{UserDict} instances.  If
-\var{initialdata} is provided, \member{data} is initialized with its
-contents; note that a reference to \var{initialdata} will not be kept, 
-allowing it be used for other purposes.
+\begin{classdesc}{UserDict}{\optional{initialdata}} 
+Class that simulates a dictionary.  The instance's contents are kept
+in a regular dictionary, which is accessible via the \member{data}
+attribute of \class{UserDict} instances.  If \var{initialdata} is
+provided, \member{data} is initialized with its contents; note that a
+reference to \var{initialdata} will not be kept, allowing it be used
+for other purposes. \note{For backward compatibility, instances of
+\class{UserDict} are not iterable.}
+\end{classdesc}
+
+\begin{classdesc}{IterableUserDict}{\optional{initialdata}}
+Subclass of \class{UserDict} that supports direct iteration (e.g. 
+\code{for key in myDict}).
 \end{classdesc}
 
 In addition to supporting the methods and operations of mappings (see
-section \ref{typesmapping}), \class{UserDict} instances provide the
-following attribute:
+section \ref{typesmapping}), \class{UserDict} and
+\class{IterableUserDict} instances provide the following attribute:
 
 \begin{memberdesc}{data}
 A real dictionary used to store the contents of the \class{UserDict}

Index: libuu.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuu.tex,v
retrieving revision 1.11.18.2
retrieving revision 1.11.18.3
diff -u -d -r1.11.18.2 -r1.11.18.3
--- libuu.tex	7 Jan 2005 06:57:29 -0000	1.11.18.2
+++ libuu.tex	16 Oct 2005 05:23:58 -0000	1.11.18.3
@@ -31,13 +31,18 @@
   respectively.
 \end{funcdesc}
 
-\begin{funcdesc}{decode}{in_file\optional{, out_file\optional{, mode}}}
+\begin{funcdesc}{decode}{in_file\optional{, out_file\optional{, mode\optional{, quiet}}}}
   This call decodes uuencoded file \var{in_file} placing the result on
   file \var{out_file}. If \var{out_file} is a pathname, \var{mode} is
   used to set the permission bits if the file must be
   created. Defaults for \var{out_file} and \var{mode} are taken from
   the uuencode header.  However, if the file specified in the header
   already exists, a \exception{uu.Error} is raised.
+
+  \function{decode()} may print a warning to standard error if the
+  input was produced by an incorrect uuencoder and Python could
+  recover from that error.  Setting \var{quiet} to a true value
+  silences this warning.
 \end{funcdesc}
 
 \begin{excclassdesc}{Error}{}

Index: libweakref.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libweakref.tex,v
retrieving revision 1.17.8.2
retrieving revision 1.17.8.3
diff -u -d -r1.17.8.2 -r1.17.8.3
--- libweakref.tex	7 Jan 2005 06:57:29 -0000	1.17.8.2
+++ libweakref.tex	16 Oct 2005 05:23:58 -0000	1.17.8.3
@@ -10,6 +10,8 @@
 
 \versionadded{2.1}
 
+% When making changes to the examples in this file, be sure to update
+% Lib/test/test_weakref.py::libreftest too!
 
 The \module{weakref} module allows the Python programmer to create
 \dfn{weak references} to objects.
@@ -228,7 +230,7 @@
 o = r()
 if o is None:
     # referent has been garbage collected
-    print "Object has been allocated; can't frobnicate."
+    print "Object has been deallocated; can't frobnicate."
 else:
     print "Object is still live!"
     o.do_something_useful()
@@ -255,20 +257,17 @@
 import weakref
 
 class ExtendedRef(weakref.ref):
-    def __new__(cls, ob, callback=None, **annotations):
-        weakref.ref.__new__(cls, ob, callback)
-        self.__counter = 0
-
     def __init__(self, ob, callback=None, **annotations):
         super(ExtendedRef, self).__init__(ob, callback)
-        for k, v in annotations:
+        self.__counter = 0
+        for k, v in annotations.iteritems():
             setattr(self, k, v)
 
     def __call__(self):
         """Return a pair containing the referent and the number of
         times the reference has been called.
         """
-        ob = super(ExtendedRef, self)()
+        ob = super(ExtendedRef, self).__call__()
         if ob is not None:
             self.__counter += 1
             ob = (ob, self.__counter)

Index: libwebbrowser.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwebbrowser.tex,v
retrieving revision 1.10
retrieving revision 1.10.18.1
diff -u -d -r1.10 -r1.10.18.1
--- libwebbrowser.tex	19 Jul 2001 03:49:33 -0000	1.10
+++ libwebbrowser.tex	16 Oct 2005 05:23:58 -0000	1.10.18.1
@@ -6,30 +6,36 @@
 \moduleauthor{Fred L. Drake, Jr.}{fdrake at acm.org}
 \sectionauthor{Fred L. Drake, Jr.}{fdrake at acm.org}
 
-The \module{webbrowser} module provides a very high-level interface to
-allow displaying Web-based documents to users.  The controller objects
-are easy to use and are platform-independent.  Under most
+The \module{webbrowser} module provides a high-level interface to
+allow displaying Web-based documents to users. Under most
 circumstances, simply calling the \function{open()} function from this
 module will do the right thing.
 
-Under \UNIX, graphical browsers are preferred under X11, but text-mode
+Under \UNIX{}, graphical browsers are preferred under X11, but text-mode
 browsers will be used if graphical browsers are not available or an X11
 display isn't available.  If text-mode browsers are used, the calling
 process will block until the user exits the browser.
 
-Under \UNIX, if the environment variable \envvar{BROWSER} exists, it
+If the environment variable \envvar{BROWSER} exists, it
 is interpreted to override the platform default list of browsers, as a
-colon-separated list of browsers to try in order.  When the value of
+os.pathsep-separated list of browsers to try in order.  When the value of
 a list part contains the string \code{\%s}, then it is interpreted as
 a literal browser command line to be used with the argument URL
 substituted for the \code{\%s}; if the part does not contain
 \code{\%s}, it is simply interpreted as the name of the browser to
 launch.
 
-For non-\UNIX{} platforms, or when X11 browsers are available on
-\UNIX, the controlling process will not wait for the user to finish
-with the browser, but allow the browser to maintain its own window on
-the display.
+For non-\UNIX{} platforms, or when a remote browser is available on
+\UNIX{}, the controlling process will not wait for the user to finish
+with the browser, but allow the remote browser to maintain its own
+windows on the display.  If remote browsers are not available on \UNIX{},
+the controlling process will launch a new browser and wait.
+
+The script \program{webbrowser} can be used as a command-line interface
+for the module. It accepts an URL as the argument. It accepts the following
+optional parameters: \programopt{-n} opens the URL in a new browser window,
+if possible; \programopt{-t} opens the URL in a new browser page ("tab"). The
+options are, naturally, mutually exclusive.
 
 The following exception is defined:
 
@@ -39,11 +45,14 @@
 
 The following functions are defined:
 
-\begin{funcdesc}{open}{url\optional{, new=0}\optional{, autoraise=1}}
-  Display \var{url} using the default browser.  If \var{new} is true,
-  a new browser window is opened if possible.  If \var{autoraise} is
+\begin{funcdesc}{open}{url\optional{, new=0\optional{, autoraise=1}}}
+  Display \var{url} using the default browser. If \var{new} is 0, the
+  \var{url} is opened in the same browser window.  If \var{new} is 1,
+  a new browser window is opened if possible.  If \var{new} is 2,
+  a new browser page ("tab") is opened if possible.  If \var{autoraise} is
   true, the window is raised if possible (note that under many window
   managers this will occur regardless of the setting of this variable).
+
 \end{funcdesc}
 
 \begin{funcdesc}{open_new}{url}
@@ -51,6 +60,12 @@
   otherwise, open \var{url} in the only browser window.
 \end{funcdesc}
 
+\begin{funcdesc}{open_new_tab}{url}
+  Open \var{url} in a new page ("tab") of the default browser, if possible,
+  otherwise equivalent to \function{open_new}.
+\versionadded{2.5}
+\end{funcdesc}
+
 \begin{funcdesc}{get}{\optional{name}}
   Return a controller object for the browser type \var{name}.  If
   \var{name} is empty, return a controller for a default browser
@@ -67,7 +82,7 @@
 
   This entry point is only useful if you plan to either set the
   \envvar{BROWSER} variable or call \function{get} with a nonempty
-  argument matching the name of a handler you declare.  
+  argument matching the name of a handler you declare.
 \end{funcdesc}
 
 A number of browser types are predefined.  This table gives the type
@@ -76,16 +91,24 @@
 in this module.
 
 \begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes}
-  \lineiii{'mozilla'}{\class{Netscape('mozilla')}}{}
-  \lineiii{'netscape'}{\class{Netscape('netscape')}}{}
-  \lineiii{'mosaic'}{\class{GenericBrowser('mosaic \%s \&')}}{}
+  \lineiii{'mozilla'}{\class{Mozilla('mozilla')}}{}
+  \lineiii{'firefox'}{\class{Mozilla('mozilla')}}{}
+  \lineiii{'netscape'}{\class{Mozilla('netscape')}}{}
+  \lineiii{'galeon'}{\class{Galeon('galeon')}}{}
+  \lineiii{'epiphany'}{\class{Galeon('epiphany')}}{}
+  \lineiii{'skipstone'}{\class{GenericBrowser('skipstone \%s \&')}}{}
+  \lineiii{'konqueror'}{\class{Konqueror()}}{(1)}
   \lineiii{'kfm'}{\class{Konqueror()}}{(1)}
+  \lineiii{'mosaic'}{\class{GenericBrowser('mosaic \%s \&')}}{}
+  \lineiii{'opera'}{\class{Opera()}}{}
   \lineiii{'grail'}{\class{Grail()}}{}
   \lineiii{'links'}{\class{GenericBrowser('links \%s')}}{}
+  \lineiii{'elinks'}{\class{Elinks('elinks')}}{}
   \lineiii{'lynx'}{\class{GenericBrowser('lynx \%s')}}{}
   \lineiii{'w3m'}{\class{GenericBrowser('w3m \%s')}}{}
   \lineiii{'windows-default'}{\class{WindowsDefault}}{(2)}
   \lineiii{'internet-config'}{\class{InternetConfig}}{(3)}
+  \lineiii{'macosx'}{\class{MacOSX('default')}}{(4)}
 \end{tableiii}
 
 \noindent
@@ -94,20 +117,22 @@
 \begin{description}
 \item[(1)]
 ``Konqueror'' is the file manager for the KDE desktop environment for
-UNIX, and only makes sense to use if KDE is running.  Some way of
+\UNIX{}, and only makes sense to use if KDE is running.  Some way of
 reliably detecting KDE would be nice; the \envvar{KDEDIR} variable is
 not sufficient.  Note also that the name ``kfm'' is used even when
 using the \program{konqueror} command with KDE 2 --- the
 implementation selects the best strategy for running Konqueror.
 
 \item[(2)]
-Only on Windows platforms; requires the common
-extension modules \module{win32api} and \module{win32con}.
+Only on Windows platforms.
 
 \item[(3)]
 Only on MacOS platforms; requires the standard MacPython \module{ic}
 module, described in the \citetitle[../mac/module-ic.html]{Macintosh
 Library Modules} manual.
+
+\item[(4)]
+Only on MacOS X platform.
 \end{description}
 
 
@@ -116,13 +141,20 @@
 Browser controllers provide two methods which parallel two of the
 module-level convenience functions:
 
-\begin{funcdesc}{open}{url\optional{, new}}
-  Display \var{url} using the browser handled by this controller.  If
-  \var{new} is true, a new browser window is opened if possible.
+\begin{funcdesc}{open}{url\optional{, new\optional{, autoraise=1}}}
+  Display \var{url} using the browser handled by this controller.
+  If \var{new} is 1, a new browser window is opened if possible.
+  If \var{new} is 2, a new browser page ("tab") is opened if possible.
 \end{funcdesc}
 
 \begin{funcdesc}{open_new}{url}
   Open \var{url} in a new window of the browser handled by this
   controller, if possible, otherwise, open \var{url} in the only
-  browser window.
+  browser window.  Alias \function{open_new}.
+\end{funcdesc}
+
+\begin{funcdesc}{open_new_tab}{url}
+  Open \var{url} in a new page ("tab") of the browser handled by this
+  controller, if possible, otherwise equivalent to \function{open_new}.
+\versionadded{2.5}
 \end{funcdesc}

Index: libxmlrpclib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libxmlrpclib.tex,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -u -d -r1.9.2.2 -r1.9.2.3
--- libxmlrpclib.tex	7 Jan 2005 06:57:29 -0000	1.9.2.2
+++ libxmlrpclib.tex	16 Oct 2005 05:23:58 -0000	1.9.2.3
@@ -5,7 +5,7 @@
 \moduleauthor{Fredrik Lundh}{fredrik at pythonware.com}
 \sectionauthor{Eric S. Raymond}{esr at snark.thyrsus.com}
 
-% Not everyting is documented yet.  It might be good to describe 
+% Not everything is documented yet.  It might be good to describe 
 % Marshaller, Unmarshaller, getparser, dumps, loads, and Transport.
 
 \versionadded{2.2}
@@ -19,7 +19,7 @@
 
 \begin{classdesc}{ServerProxy}{uri\optional{, transport\optional{,
                                encoding\optional{, verbose\optional{, 
-                               allow_none}}}}}
+                               allow_none\optional{, use_datetime}}}}}}
 A \class{ServerProxy} instance is an object that manages communication
 with a remote XML-RPC server.  The required first argument is a URI
 (Uniform Resource Indicator), and will normally be the URL of the
@@ -32,7 +32,14 @@
 default behaviour is for \code{None} to raise a \exception{TypeError}.
 This is a commonly-used extension to the XML-RPC specification, but isn't
 supported by all clients and servers; see
-\url{http://ontosys.com/xml-rpc/extensions.html} for a description. 
+\url{http://ontosys.com/xml-rpc/extensions.php} for a description. 
+The \var{use_datetime} flag can be used to cause date/time values to be
+presented as \class{\refmodule{datetime}.datetime} objects; this is false
+by default.  \class{\refmodule{datetime}.datetime},
+\class{\refmodule{datetime}.date} and \class{\refmodule{datetime}.time}
+objects may be passed to calls.  \class{\refmodule{datetime}.date} objects
+are converted with a time of ``00:00:00''.
+\class{\refmodule{datetime}.time} objects are converted using today's date.
 
 Both the HTTP and HTTPS transports support the URL syntax extension for
 HTTP Basic Authentication: \code{http://user:pass@host:port/path}.  The 
@@ -62,8 +69,11 @@
                   elements. Arrays are returned as lists}
   \lineii{structures}{A Python dictionary. Keys must be strings,
                       values may be any conformable type.}
-  \lineii{dates}{in seconds since the epoch; pass in an instance of the
-                 \class{DateTime} wrapper class}
+  \lineii{dates}{in seconds since the epoch (pass in an instance of the
+                 \class{DateTime} class) or a
+                 \class{\refmodule{datetime}.datetime},
+                 \class{\refmodule{datetime}.date} or
+                 \class{\refmodule{datetime}.time} instance} 
   \lineii{binary data}{pass in an instance of the \class{Binary}
                        wrapper class}
 \end{tableii}
@@ -87,6 +97,7 @@
 \class{Server} is retained as an alias for \class{ServerProxy} for backwards
 compatibility.  New code should use \class{ServerProxy}.
 
+\versionchanged[The \var{use_datetime} flag was added]{2.5}
 \end{classdesc}
 
 
@@ -96,7 +107,7 @@
             client software in several languages.  Contains pretty much
             everything an XML-RPC client developer needs to know.}
   \seetitle[http://xmlrpc-c.sourceforge.net/hacks.php]
-           {XML-RPC-Hacks page}{Extensions for various open-source
+           {XML-RPC Hacks page}{Extensions for various open-source
             libraries to support introspection and multicall.}
 \end{seealso}
 
@@ -149,7 +160,8 @@
 Introspection methods are currently supported by servers written in
 PHP, C and Microsoft .NET. Partial introspection support is included
 in recent updates to UserLand Frontier. Introspection support for
-Perl, Python and Java is available at the XML-RPC Hacks page.
+Perl, Python and Java is available at the \ulink{XML-RPC
+Hacks}{http://xmlrpc-c.sourceforge.net/hacks.php} page.
 
 
 \subsection{Boolean Objects \label{boolean-objects}}
@@ -170,21 +182,23 @@
 
 \subsection{DateTime Objects \label{datetime-objects}}
 
-This class may be initialized with seconds since the epoch, a
-time tuple, or an ISO 8601 time/date string.  It has the following
-methods, supported mainly for internal use by the
-marshalling/unmarshalling code:
+This class may be initialized with seconds since the epoch, a time tuple, an
+ISO 8601 time/date string, or a {}\class{\refmodule{datetime}.datetime},
+{}\class{\refmodule{datetime}.date} or {}\class{\refmodule{datetime}.time}
+instance.  It has the following methods, supported mainly for internal use
+by the marshalling/unmarshalling code:
 
 \begin{methoddesc}{decode}{string}
 Accept a string as the instance's new time value.
 \end{methoddesc}
 
 \begin{methoddesc}{encode}{out}
-Write the XML-RPC encoding of this DateTime item to the out stream object.
+Write the XML-RPC encoding of this \class{DateTime} item to the
+\var{out} stream object.
 \end{methoddesc}
 
 It also supports certain of Python's built-in operators through 
-\method{__cmp__} and \method{__repr__} methods.
+\method{__cmp__()} and \method{__repr__()} methods.
 
 
 \subsection{Binary Objects \label{binary-objects}}
@@ -296,7 +310,6 @@
 \begin{funcdesc}{dumps}{params\optional{, methodname\optional{, 
 	                methodresponse\optional{, encoding\optional{,
 	                allow_none}}}}}
-
 Convert \var{params} into an XML-RPC request.
 or into a response if \var{methodresponse} is true.
 \var{params} can be either a tuple of arguments or an instance of the 
@@ -308,12 +321,21 @@
 provide a true value for \var{allow_none}.
 \end{funcdesc}
 
-\begin{funcdesc}{loads}{data}
+\begin{funcdesc}{loads}{data\optional{, use_datetime}}
 Convert an XML-RPC request or response into Python objects, a
 \code{(\var{params}, \var{methodname})}.  \var{params} is a tuple of argument; \var{methodname}
 is a string, or \code{None} if no method name is present in the packet.
 If the XML-RPC packet represents a fault condition, this
 function will raise a \exception{Fault} exception.
+The \var{use_datetime} flag can be used to cause date/time values to be
+presented as \class{\refmodule{datetime}.datetime} objects; this is false
+by default.
+Note that even if you call an XML-RPC method with
+\class{\refmodule{datetime}.date} or \class{\refmodule{datetime}.time}
+objects, they are converted to \class{DateTime} objects internally, so only
+{}\class{\refmodule{datetime}.datetime} objects will be returned.
+
+\versionchanged[The \var{use_datetime} flag was added]{2.5}
 \end{funcdesc}
 
 

Index: libzlib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libzlib.tex,v
retrieving revision 1.27.12.1
retrieving revision 1.27.12.2
diff -u -d -r1.27.12.1 -r1.27.12.2
--- libzlib.tex	7 Jan 2005 06:57:29 -0000	1.27.12.1
+++ libzlib.tex	16 Oct 2005 05:23:58 -0000	1.27.12.2
@@ -8,11 +8,16 @@
 
 For applications that require data compression, the functions in this
 module allow compression and decompression, using the zlib library.
-The zlib library has its own home page at \url{http://www.gzip.org/zlib/}.  
+The zlib library has its own home page at \url{http://www.zlib.net}.  
 There are known incompatibilities between the Python module and
 versions of the zlib library earlier than 1.1.3; 1.1.3 has a security
 vulnerability, so we recommend using 1.1.4 or later.
 
+zlib's functions have many options and often need to be used in a
+particular order.  This documentation doesn't attempt to cover all of
+the permutations; consult the zlib manual at
+\url{http://www.zlib.net/manual.html} for authoritative information.
+
 The available exception and functions in this module are:
 
 \begin{excdesc}{error}
@@ -110,8 +115,7 @@
 compressed output is returned.  \var{mode} can be selected from the
 constants \constant{Z_SYNC_FLUSH},  \constant{Z_FULL_FLUSH},  or 
 \constant{Z_FINISH}, defaulting to \constant{Z_FINISH}.  \constant{Z_SYNC_FLUSH} and 
-\constant{Z_FULL_FLUSH} allow compressing further strings of data and
-are used to allow partial error recovery on decompression, while
+\constant{Z_FULL_FLUSH} allow compressing further strings of data, while
 \constant{Z_FINISH} finishes the compressed stream and 
 prevents compressing any more data.  After calling
 \method{flush()} with \var{mode} set to \constant{Z_FINISH}, the
@@ -171,5 +175,7 @@
 
 \begin{seealso}
   \seemodule{gzip}{Reading and writing \program{gzip}-format files.}
-  \seeurl{http://www.gzip.org/zlib/}{The zlib library home page.}
+  \seeurl{http://www.zlib.net}{The zlib library home page.}
+  \seeurl{http://www.zlib.net/manual.html}{The zlib manual explains 
+    the semantics and usage of the library's many functions.}
 \end{seealso}

Index: tkinter.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -d -r1.12.2.2 -r1.12.2.3
--- tkinter.tex	7 Jan 2005 06:57:29 -0000	1.12.2.2
+++ tkinter.tex	16 Oct 2005 05:23:58 -0000	1.12.2.3
@@ -258,8 +258,10 @@
         self.pack()
         self.createWidgets()
 
-app = Application()
+root = Tk()
+app = Application(master=root)
 app.mainloop()
+root.destroy()
 \end{verbatim}
 
 
@@ -621,7 +623,6 @@
         self.entrythingy = Entry()
         self.entrythingy.pack()
         
-        self.button.pack()
         # here is the application variable
         self.contents = StringVar()
         # set it to some value
@@ -732,7 +733,7 @@
 Screen distances can be specified in either pixels or absolute
 distances.  Pixels are given as numbers and absolute distances as
 strings, with the trailing character denoting units: \code{c}
-for centimeters, \code{i} for inches, \code{m} for millimeters,
+for centimetres, \code{i} for inches, \code{m} for millimetres,
 \code{p} for printer's points.  For example, 3.5 inches is expressed
 as \code{"3.5i"}.
 
@@ -1354,7 +1355,7 @@
 
 \item
 \ulink{Compound}
-{http://tix.sourceforge.net/dist/current/man/html/TixCmd/compound.html}
+{http://tix.sourceforge.net/dist/current/man/html/TixCmd/compound.htm}
 image types can be used to create images that consists of multiple
 horizontal lines; each line is composed of a series of items (texts,
 bitmaps, images or spaces) arranged from left to right. For example, a

Index: xmldom.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/xmldom.tex,v
retrieving revision 1.19.8.2
retrieving revision 1.19.8.3
diff -u -d -r1.19.8.2 -r1.19.8.3
--- xmldom.tex	7 Jan 2005 06:57:30 -0000	1.19.8.2
+++ xmldom.tex	16 Oct 2005 05:23:58 -0000	1.19.8.3
@@ -84,8 +84,8 @@
   \seetitle[http://pyxml.sourceforge.net]{PyXML}{Users that require a
             full-featured implementation of DOM should use the PyXML
             package.}
-  \seetitle[http://cgi.omg.org/cgi-bin/doc?orbos/99-08-02.pdf]{CORBA
-            Scripting with Python}
+  \seetitle[http://www.omg.org/docs/formal/02-11-05.pdf]{Python
+            Language Mapping Specification}
            {This specifies the mapping from OMG IDL to Python.}
 \end{seealso}
 
@@ -213,6 +213,24 @@
 \class{DOMImplementation} as well.
 
 \begin{methoddesc}[DOMImplementation]{hasFeature}{feature, version}
+Return true if the feature identified by the pair of strings
+\var{feature} and \var{version} is implemented.
+\end{methoddesc}
+
+\begin{methoddesc}[DOMImplementation]{createDocument}{namespaceUri, qualifiedName, doctype}
+Return a new \class{Document} object (the root of the DOM), with a
+child \class{Element} object having the given \var{namespaceUri} and
+\var{qualifiedName}. The \var{doctype} must be a \class{DocumentType}
+object created by \method{createDocumentType()}, or \code{None}.
+In the Python DOM API, the first two arguments can also be \code{None}
+in order to indicate that no \class{Element} child is to be created.
+\end{methoddesc}
+
+\begin{methoddesc}[DOMImplementation]{createDocumentType}{qualifiedName, publicId, systemId}
+Return a new \class{DocumentType} object that encapsulates the given
+\var{qualifiedName}, \var{publicId}, and \var{systemId} strings,
+representing the information contained in an XML document type
+declaration.
 \end{methoddesc}
 
 
@@ -545,8 +563,19 @@
 Same as equivalent method in the \class{Document} class.
 \end{methoddesc}
 
-\begin{methoddesc}[Element]{getAttribute}{attname}
-Return an attribute value as a string.
+\begin{methoddesc}[Element]{hasAttribute}{name}
+Returns true if the element has an attribute named by \var{name}.
+\end{methoddesc}
+
+\begin{methoddesc}[Element]{hasAttributeNS}{namespaceURI, localName}
+Returns true if the element has an attribute named by
+\var{namespaceURI} and \var{localName}.
+\end{methoddesc}
+
+\begin{methoddesc}[Element]{getAttribute}{name}
+Return the value of the attribute named by \var{name} as a
+string. If no such attribute exists, an empty string is returned,
+as if the attribute had no value.
 \end{methoddesc}
 
 \begin{methoddesc}[Element]{getAttributeNode}{attrname}
@@ -555,8 +584,9 @@
 \end{methoddesc}
 
 \begin{methoddesc}[Element]{getAttributeNS}{namespaceURI, localName}
-Return an attribute value as a string, given a \var{namespaceURI} and
-\var{localName}.
+Return the value of the attribute named by \var{namespaceURI} and
+\var{localName} as a string. If no such attribute exists, an empty
+string is returned, as if the attribute had no value.
 \end{methoddesc}
 
 \begin{methoddesc}[Element]{getAttributeNodeNS}{namespaceURI, localName}
@@ -564,7 +594,7 @@
 \var{localName}.
 \end{methoddesc}
 
-\begin{methoddesc}[Element]{removeAttribute}{attname}
+\begin{methoddesc}[Element]{removeAttribute}{name}
 Remove an attribute by name.  No exception is raised if there is no
 matching attribute.
 \end{methoddesc}
@@ -579,7 +609,7 @@
 qname.  No exception is raised if there is no matching attribute.
 \end{methoddesc}
 
-\begin{methoddesc}[Element]{setAttribute}{attname, value}
+\begin{methoddesc}[Element]{setAttribute}{name, value}
 Set an attribute value from a string.
 \end{methoddesc}
 
@@ -886,8 +916,13 @@
 \keyword{readonly} may not restrict write access in all DOM
 implementations.
 
-Additionally, the accessor functions are not required.  If provided,
+In the Python DOM API, accessor functions are not required.  If provided,
 they should take the form defined by the Python IDL mapping, but
 these methods are considered unnecessary since the attributes are
 accessible directly from Python.  ``Set'' accessors should never be
 provided for \keyword{readonly} attributes.
+
+The IDL definitions do not fully embody the requirements of the W3C DOM
+API, such as the notion of certain objects, such as the return value of
+\method{getElementsByTagName()}, being ``live''.  The Python DOM API
+does not require implementations to enforce such requirements.



More information about the Python-checkins mailing list