[Python-checkins] r85251 - in python/branches/release31-maint: Doc/c-api/init.rst Doc/c-api/unicode.rst Doc/extending/extending.rst Doc/faq/library.rst Doc/library/base64.rst Doc/library/bdb.rst Doc/library/cgi.rst Doc/library/cmd.rst Doc/library/doctest.rst Doc/library/email.errors.rst Doc/library/html.parser.rst Doc/library/linecache.rst Doc/library/mmap.rst Doc/library/parser.rst Doc/library/pyexpat.rst Doc/library/smtplib.rst Doc/library/string.rst Doc/library/sys.rst Doc/library/urllib.parse.rst Doc/library/wsgiref.rst Doc/library/xml.sax.reader.rst Doc/library/zipfile.rst Doc/tutorial/classes.rst Doc/whatsnew/2.4.rst Modules/selectmodule.c README Tools/scripts/win_add2path.py Tools/versioncheck configure.in

georg.brandl python-checkins at python.org
Wed Oct 6 10:35:38 CEST 2010


Author: georg.brandl
Date: Wed Oct  6 10:35:38 2010
New Revision: 85251

Log:
Merged revisions 83561,83563,83565-83566,83569,83571,83574-83575,83580,83584,83599,83612,83659,83977,84015-84018,84020,84141 via svnmerge from 
svn+ssh://svn.python.org/python/branches/py3k

........
  r83561 | georg.brandl | 2010-08-02 22:17:50 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #4280: remove outdated "versionchecker" tool.
........
  r83563 | georg.brandl | 2010-08-02 22:21:21 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #9037: add example how to raise custom exceptions from C code.
........
  r83565 | georg.brandl | 2010-08-02 22:27:20 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #9111: document that do_help() looks at docstrings.
........
  r83566 | georg.brandl | 2010-08-02 22:30:57 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #9019: remove false (in 3k) claim about Headers updates.
........
  r83569 | georg.brandl | 2010-08-02 22:39:35 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #7797: be explicit about bytes-oriented interface of base64 functions.
........
  r83571 | georg.brandl | 2010-08-02 22:44:34 +0200 (Mo, 02 Aug 2010) | 1 line
  
  Clarify that abs() is not a namespace.
........
  r83574 | georg.brandl | 2010-08-02 22:47:56 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #6867: epoll.register() returns None.
........
  r83575 | georg.brandl | 2010-08-02 22:52:10 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #9238: zipfile does handle archive comments.
........
  r83580 | georg.brandl | 2010-08-02 23:02:36 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #8119: fix copy-paste error.
........
  r83584 | georg.brandl | 2010-08-02 23:07:14 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #9457: fix documentation links for 3.2.
........
  r83599 | georg.brandl | 2010-08-02 23:51:18 +0200 (Mo, 02 Aug 2010) | 1 line
  
  #9061: warn that single quotes are never escaped.
........
  r83612 | georg.brandl | 2010-08-03 00:59:44 +0200 (Di, 03 Aug 2010) | 1 line
  
  Fix unicode literal.
........
  r83659 | georg.brandl | 2010-08-03 14:06:29 +0200 (Di, 03 Aug 2010) | 1 line
  
  Terminology fix: exceptions are raised, except in generator.throw().
........
  r83977 | georg.brandl | 2010-08-13 17:10:49 +0200 (Fr, 13 Aug 2010) | 1 line
  
  Fix copy-paste error.
........
  r84015 | georg.brandl | 2010-08-14 17:44:34 +0200 (Sa, 14 Aug 2010) | 1 line
  
  Add some maintainers.
........
  r84016 | georg.brandl | 2010-08-14 17:46:15 +0200 (Sa, 14 Aug 2010) | 1 line
  
  Wording fix.
........
  r84017 | georg.brandl | 2010-08-14 17:46:59 +0200 (Sa, 14 Aug 2010) | 1 line
  
  Typo fix.
........
  r84018 | georg.brandl | 2010-08-14 17:48:49 +0200 (Sa, 14 Aug 2010) | 1 line
  
  Typo fix.
........
  r84020 | georg.brandl | 2010-08-14 17:57:20 +0200 (Sa, 14 Aug 2010) | 1 line
  
  Fix format.
........
  r84141 | georg.brandl | 2010-08-17 16:11:59 +0200 (Di, 17 Aug 2010) | 1 line
  
  Markup nits.
........


Removed:
   python/branches/release31-maint/Tools/versioncheck/
Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Doc/c-api/init.rst
   python/branches/release31-maint/Doc/c-api/unicode.rst
   python/branches/release31-maint/Doc/extending/extending.rst
   python/branches/release31-maint/Doc/faq/library.rst
   python/branches/release31-maint/Doc/library/base64.rst
   python/branches/release31-maint/Doc/library/bdb.rst
   python/branches/release31-maint/Doc/library/cgi.rst
   python/branches/release31-maint/Doc/library/cmd.rst
   python/branches/release31-maint/Doc/library/doctest.rst
   python/branches/release31-maint/Doc/library/email.errors.rst
   python/branches/release31-maint/Doc/library/html.parser.rst
   python/branches/release31-maint/Doc/library/linecache.rst
   python/branches/release31-maint/Doc/library/mmap.rst
   python/branches/release31-maint/Doc/library/parser.rst
   python/branches/release31-maint/Doc/library/pyexpat.rst
   python/branches/release31-maint/Doc/library/smtplib.rst
   python/branches/release31-maint/Doc/library/string.rst
   python/branches/release31-maint/Doc/library/sys.rst
   python/branches/release31-maint/Doc/library/urllib.parse.rst
   python/branches/release31-maint/Doc/library/wsgiref.rst
   python/branches/release31-maint/Doc/library/xml.sax.reader.rst
   python/branches/release31-maint/Doc/library/zipfile.rst
   python/branches/release31-maint/Doc/tutorial/classes.rst
   python/branches/release31-maint/Doc/whatsnew/2.4.rst
   python/branches/release31-maint/Modules/selectmodule.c
   python/branches/release31-maint/README
   python/branches/release31-maint/Tools/scripts/win_add2path.py
   python/branches/release31-maint/configure.in

Modified: python/branches/release31-maint/Doc/c-api/init.rst
==============================================================================
--- python/branches/release31-maint/Doc/c-api/init.rst	(original)
+++ python/branches/release31-maint/Doc/c-api/init.rst	Wed Oct  6 10:35:38 2010
@@ -959,7 +959,7 @@
 .. cvar:: int PyTrace_C_EXCEPTION
 
    The value for the *what* parameter to :ctype:`Py_tracefunc` functions when a C
-   function has thrown an exception.
+   function has raised an exception.
 
 
 .. cvar:: int PyTrace_C_RETURN

Modified: python/branches/release31-maint/Doc/c-api/unicode.rst
==============================================================================
--- python/branches/release31-maint/Doc/c-api/unicode.rst	(original)
+++ python/branches/release31-maint/Doc/c-api/unicode.rst	Wed Oct  6 10:35:38 2010
@@ -653,7 +653,7 @@
    *s*.  Return *NULL* if an exception was raised by the codec.
 
 
-.. cfunction:: PyObject* PyUnicode_DecodeUTF8Stateful(const char *s, Py_ssize_t size, const char *errors, Py_ssize_t *consumed)
+.. cfunction:: PyObject* PyUnicode_DecodeUTF7Stateful(const char *s, Py_ssize_t size, const char *errors, Py_ssize_t *consumed)
 
    If *consumed* is *NULL*, behave like :cfunc:`PyUnicode_DecodeUTF7`.  If
    *consumed* is not *NULL*, trailing incomplete UTF-7 base-64 sections will not

Modified: python/branches/release31-maint/Doc/extending/extending.rst
==============================================================================
--- python/branches/release31-maint/Doc/extending/extending.rst	(original)
+++ python/branches/release31-maint/Doc/extending/extending.rst	Wed Oct  6 10:35:38 2010
@@ -219,9 +219,28 @@
 become a dangling pointer. Should it become a dangling pointer, C code which
 raises the exception could cause a core dump or other unintended side effects.
 
-We discuss the use of PyMODINIT_FUNC as a function return type later in this
+We discuss the use of ``PyMODINIT_FUNC`` as a function return type later in this
 sample.
 
+The :exc:`spam.error` exception can be raised in your extension module using a
+call to :cfunc:`PyErr_SetString` as shown below::
+
+   static PyObject *
+   spam_system(PyObject *self, PyObject *args)
+   {
+       const char *command;
+       int sts;
+
+       if (!PyArg_ParseTuple(args, "s", &command))
+           return NULL;
+       sts = system(command);
+       if (sts < 0) {
+           PyErr_SetString(SpamError, "System command failed");
+           return NULL;
+       }
+       return PyLong_FromLong(sts);
+   }
+
 
 .. _backtoexample:
 

Modified: python/branches/release31-maint/Doc/faq/library.rst
==============================================================================
--- python/branches/release31-maint/Doc/faq/library.rst	(original)
+++ python/branches/release31-maint/Doc/faq/library.rst	Wed Oct  6 10:35:38 2010
@@ -674,8 +674,8 @@
                                 '/cgi-bin/some-cgi-script', data=qs)
    msg, hdrs = req.read(), req.info()
 
-Note that in general for a percent-encoded POST operations, query strings must be
-quoted by using :func:`urllib.parse.urlencode`.  For example to send name="Guy Steele,
+Note that in general for percent-encoded POST operations, query strings must be
+quoted using :func:`urllib.parse.urlencode`.  For example to send name="Guy Steele,
 Jr."::
 
    >>> import urllib.parse

Modified: python/branches/release31-maint/Doc/library/base64.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/base64.rst	(original)
+++ python/branches/release31-maint/Doc/library/base64.rst	Wed Oct  6 10:35:38 2010
@@ -24,7 +24,7 @@
 
 .. function:: b64encode(s, altchars=None)
 
-   Encode a string use Base64.
+   Encode a byte string use Base64.
 
    *s* is the string to encode.  Optional *altchars* must be a string of at least
    length 2 (additional characters are ignored) which specifies an alternative
@@ -32,54 +32,54 @@
    generate URL or filesystem safe Base64 strings.  The default is ``None``, for
    which the standard Base64 alphabet is used.
 
-   The encoded string is returned.
+   The encoded byte string is returned.
 
 
 .. function:: b64decode(s, altchars=None)
 
-   Decode a Base64 encoded string.
+   Decode a Base64 encoded byte string.
 
    *s* is the string to decode.  Optional *altchars* must be a string of at least
    length 2 (additional characters are ignored) which specifies the alternative
    alphabet used instead of the ``+`` and ``/`` characters.
 
-   The decoded string is returned.  A :exc:`TypeError` is raised if *s* were
+   The decoded byte string is returned.  A :exc:`TypeError` is raised if *s* were
    incorrectly padded or if there are non-alphabet characters present in the
    string.
 
 
 .. function:: standard_b64encode(s)
 
-   Encode string *s* using the standard Base64 alphabet.
+   Encode byte string *s* using the standard Base64 alphabet.
 
 
 .. function:: standard_b64decode(s)
 
-   Decode string *s* using the standard Base64 alphabet.
+   Decode byte string *s* using the standard Base64 alphabet.
 
 
 .. function:: urlsafe_b64encode(s)
 
-   Encode string *s* using a URL-safe alphabet, which substitutes ``-`` instead of
+   Encode byte string *s* using a URL-safe alphabet, which substitutes ``-`` instead of
    ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet.  The result
    can still contain ``=``.
 
 
 .. function:: urlsafe_b64decode(s)
 
-   Decode string *s* using a URL-safe alphabet, which substitutes ``-`` instead of
+   Decode byte string *s* using a URL-safe alphabet, which substitutes ``-`` instead of
    ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet.
 
 
 .. function:: b32encode(s)
 
-   Encode a string using Base32.  *s* is the string to encode.  The encoded string
+   Encode a byte string using Base32.  *s* is the string to encode.  The encoded string
    is returned.
 
 
 .. function:: b32decode(s, casefold=False, map01=None)
 
-   Decode a Base32 encoded string.
+   Decode a Base32 encoded byte string.
 
    *s* is the string to decode.  Optional *casefold* is a flag specifying whether a
    lowercase alphabet is acceptable as input.  For security purposes, the default
@@ -92,27 +92,27 @@
    digit 0 is always mapped to the letter O).  For security purposes the default is
    ``None``, so that 0 and 1 are not allowed in the input.
 
-   The decoded string is returned.  A :exc:`TypeError` is raised if *s* were
+   The decoded byte string is returned.  A :exc:`TypeError` is raised if *s* were
    incorrectly padded or if there are non-alphabet characters present in the
    string.
 
 
 .. function:: b16encode(s)
 
-   Encode a string using Base16.
+   Encode a byte string using Base16.
 
-   *s* is the string to encode.  The encoded string is returned.
+   *s* is the string to encode.  The encoded byte string is returned.
 
 
 .. function:: b16decode(s, casefold=False)
 
-   Decode a Base16 encoded string.
+   Decode a Base16 encoded byte string.
 
    *s* is the string to decode.  Optional *casefold* is a flag specifying whether a
    lowercase alphabet is acceptable as input.  For security purposes, the default
    is ``False``.
 
-   The decoded string is returned.  A :exc:`TypeError` is raised if *s* were
+   The decoded byte string is returned.  A :exc:`TypeError` is raised if *s* were
    incorrectly padded or if there are non-alphabet characters present in the
    string.
 

Modified: python/branches/release31-maint/Doc/library/bdb.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/bdb.rst	(original)
+++ python/branches/release31-maint/Doc/library/bdb.rst	Wed Oct  6 10:35:38 2010
@@ -108,7 +108,7 @@
       * ``"exception"``: An exception has occurred.
       * ``"c_call"``: A C function is about to be called.
       * ``"c_return"``: A C function has returned.
-      * ``"c_exception"``: A C function has thrown an exception.
+      * ``"c_exception"``: A C function has raised an exception.
 
       For the Python events, specialized functions (see below) are called.  For
       the C events, no action is taken.

Modified: python/branches/release31-maint/Doc/library/cgi.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/cgi.rst	(original)
+++ python/branches/release31-maint/Doc/library/cgi.rst	Wed Oct  6 10:35:38 2010
@@ -330,6 +330,10 @@
    :func:`~xml.sax.saxutils.quoteattr` function in the :mod:`xml.sax.saxutils`
    module instead.
 
+   If the value to be quoted might include single- or double-quote characters,
+   or both, consider using the :func:`quoteattr` function in the
+   :mod:`xml.sax.saxutils` module instead.
+
 
 .. _cgi-security:
 

Modified: python/branches/release31-maint/Doc/library/cmd.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/cmd.rst	(original)
+++ python/branches/release31-maint/Doc/library/cmd.rst	Wed Oct  6 10:35:38 2010
@@ -76,11 +76,13 @@
    are the beginning and ending indexes of the prefix text, which could be used to
    provide different completion depending upon which position the argument is in.
 
-   All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This
+   All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`.  This
    method, called with an argument ``'bar'``, invokes the corresponding method
-   :meth:`help_bar`.  With no argument, :meth:`do_help` lists all available help
-   topics (that is, all commands with corresponding :meth:`help_\*` methods), and
-   also lists any undocumented commands.
+   :meth:`help_bar`, and if that is not present, prints the docstring of
+   :meth:`do_bar`, if available.  With no argument, :meth:`do_help` lists all
+   available help topics (that is, all commands with corresponding
+   :meth:`help_\*` methods or commands that have docstrings), and also lists any
+   undocumented commands.
 
 
 .. method:: Cmd.onecmd(str)

Modified: python/branches/release31-maint/Doc/library/doctest.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/doctest.rst	(original)
+++ python/branches/release31-maint/Doc/library/doctest.rst	Wed Oct  6 10:35:38 2010
@@ -1657,7 +1657,7 @@
 
 .. exception:: DocTestFailure(test, example, got)
 
-   An exception thrown by :class:`DocTestRunner` to signal that a doctest example's
+   An exception raised by :class:`DocTestRunner` to signal that a doctest example's
    actual output did not match its expected output. The constructor arguments are
    used to initialize the member variables of the same names.
 
@@ -1681,9 +1681,9 @@
 
 .. exception:: UnexpectedException(test, example, exc_info)
 
-   An exception thrown by :class:`DocTestRunner` to signal that a doctest example
-   raised an unexpected exception.  The constructor arguments are used to
-   initialize the member variables of the same names.
+   An exception raised by :class:`DocTestRunner` to signal that a doctest
+   example raised an unexpected exception.  The constructor arguments are used
+   to initialize the member variables of the same names.
 
 :exc:`UnexpectedException` defines the following member variables:
 

Modified: python/branches/release31-maint/Doc/library/email.errors.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/email.errors.rst	(original)
+++ python/branches/release31-maint/Doc/library/email.errors.rst	Wed Oct  6 10:35:38 2010
@@ -17,7 +17,7 @@
 
 .. exception:: MessageParseError()
 
-   This is the base class for exceptions thrown by the :class:`~email.parser.Parser`
+   This is the base class for exceptions raised by the :class:`~email.parser.Parser`
    class.  It is derived from :exc:`MessageError`.
 
 

Modified: python/branches/release31-maint/Doc/library/html.parser.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/html.parser.rst	(original)
+++ python/branches/release31-maint/Doc/library/html.parser.rst	Wed Oct  6 10:35:38 2010
@@ -145,7 +145,7 @@
    Method called when an unrecognized SGML declaration is read by the parser.
    The *data* parameter will be the entire contents of the declaration inside
    the ``<!...>`` markup.  It is sometimes useful to be be overridden by a
-   derived class; the base class implementation throws an :exc:`HTMLParseError`.
+   derived class; the base class implementation raises an :exc:`HTMLParseError`.
 
 
 .. method:: HTMLParser.handle_pi(data)

Modified: python/branches/release31-maint/Doc/library/linecache.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/linecache.rst	(original)
+++ python/branches/release31-maint/Doc/library/linecache.rst	Wed Oct  6 10:35:38 2010
@@ -16,7 +16,7 @@
 
 .. function:: getline(filename, lineno, module_globals=None)
 
-   Get line *lineno* from file named *filename*. This function will never throw an
+   Get line *lineno* from file named *filename*. This function will never raise an
    exception --- it will return ``''`` on errors (the terminating newline character
    will be included for lines that are found).
 

Modified: python/branches/release31-maint/Doc/library/mmap.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/mmap.rst	(original)
+++ python/branches/release31-maint/Doc/library/mmap.rst	Wed Oct  6 10:35:38 2010
@@ -165,7 +165,7 @@
 
       Copy the *count* bytes starting at offset *src* to the destination index
       *dest*.  If the mmap was created with :const:`ACCESS_READ`, then calls to
-      move will throw a :exc:`TypeError` exception.
+      move will raise a :exc:`TypeError` exception.
 
 
    .. method:: read(num)
@@ -191,7 +191,7 @@
 
       Resizes the map and the underlying file, if any. If the mmap was created
       with :const:`ACCESS_READ` or :const:`ACCESS_COPY`, resizing the map will
-      throw a :exc:`TypeError` exception.
+      raise a :exc:`TypeError` exception.
 
 
    .. method:: rfind(sub[, start[, end]])
@@ -226,7 +226,7 @@
       Write the bytes in *bytes* into memory at the current position of the
       file pointer; the file position is updated to point after the bytes that
       were written. If the mmap was created with :const:`ACCESS_READ`, then
-      writing to it will throw a :exc:`TypeError` exception.
+      writing to it will raise a :exc:`TypeError` exception.
 
 
    .. method:: write_byte(byte)
@@ -234,6 +234,4 @@
       Write the the integer *byte* into memory at the current
       position of the file pointer; the file position is advanced by ``1``. If
       the mmap was created with :const:`ACCESS_READ`, then writing to it will
-      throw a :exc:`TypeError` exception.
-
-
+      raise a :exc:`TypeError` exception.

Modified: python/branches/release31-maint/Doc/library/parser.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/parser.rst	(original)
+++ python/branches/release31-maint/Doc/library/parser.rst	Wed Oct  6 10:35:38 2010
@@ -115,7 +115,7 @@
    The :func:`expr` function parses the parameter *source* as if it were an input
    to ``compile(source, 'file.py', 'eval')``.  If the parse succeeds, an ST object
    is created to hold the internal parse tree representation, otherwise an
-   appropriate exception is thrown.
+   appropriate exception is raised.
 
 
 .. function:: suite(source)
@@ -123,7 +123,7 @@
    The :func:`suite` function parses the parameter *source* as if it were an input
    to ``compile(source, 'file.py', 'exec')``.  If the parse succeeds, an ST object
    is created to hold the internal parse tree representation, otherwise an
-   appropriate exception is thrown.
+   appropriate exception is raised.
 
 
 .. function:: sequence2st(sequence)
@@ -133,9 +133,9 @@
    to the Python grammar and all nodes are valid node types in the host version of
    Python, an ST object is created from the internal representation and returned
    to the called.  If there is a problem creating the internal representation, or
-   if the tree cannot be validated, a :exc:`ParserError` exception is thrown.  An
+   if the tree cannot be validated, a :exc:`ParserError` exception is raised.  An
    ST object created this way should not be assumed to compile correctly; normal
-   exceptions thrown by compilation may still be initiated when the ST object is
+   exceptions raised by compilation may still be initiated when the ST object is
    passed to :func:`compilest`.  This may indicate problems not related to syntax
    (such as a :exc:`MemoryError` exception), but may also be due to constructs such
    as the result of parsing ``del f(0)``, which escapes the Python parser but is
@@ -260,8 +260,8 @@
 .. exception:: ParserError
 
    Exception raised when a failure occurs within the parser module.  This is
-   generally produced for validation failures rather than the built in
-   :exc:`SyntaxError` thrown during normal parsing. The exception argument is
+   generally produced for validation failures rather than the built-in
+   :exc:`SyntaxError` raised during normal parsing. The exception argument is
    either a string describing the reason of the failure or a tuple containing a
    sequence causing the failure from a parse tree passed to :func:`sequence2st`
    and an explanatory string.  Calls to :func:`sequence2st` need to be able to
@@ -269,7 +269,7 @@
    will only need to be aware of the simple string values.
 
 Note that the functions :func:`compilest`, :func:`expr`, and :func:`suite` may
-throw exceptions which are normally thrown by the parsing and compilation
+raise exceptions which are normally thrown by the parsing and compilation
 process.  These include the built in exceptions :exc:`MemoryError`,
 :exc:`OverflowError`, :exc:`SyntaxError`, and :exc:`SystemError`.  In these
 cases, these exceptions carry all the meaning normally associated with them.

Modified: python/branches/release31-maint/Doc/library/pyexpat.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/pyexpat.rst	(original)
+++ python/branches/release31-maint/Doc/library/pyexpat.rst	Wed Oct  6 10:35:38 2010
@@ -430,7 +430,7 @@
    Called if the XML document hasn't been declared as being a standalone document.
    This happens when there is an external subset or a reference to a parameter
    entity, but the XML declaration does not set standalone to ``yes`` in an XML
-   declaration.  If this handler returns ``0``, then the parser will throw an
+   declaration.  If this handler returns ``0``, then the parser will raise an
    :const:`XML_ERROR_NOT_STANDALONE` error.  If this handler is not set, no
    exception is raised by the parser for this condition.
 
@@ -447,7 +447,7 @@
    responsible for creating the sub-parser using
    ``ExternalEntityParserCreate(context)``, initializing it with the appropriate
    callbacks, and parsing the entity.  This handler should return an integer; if it
-   returns ``0``, the parser will throw an
+   returns ``0``, the parser will raise an
    :const:`XML_ERROR_EXTERNAL_ENTITY_HANDLING` error, otherwise parsing will
    continue.
 

Modified: python/branches/release31-maint/Doc/library/smtplib.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/smtplib.rst	(original)
+++ python/branches/release31-maint/Doc/library/smtplib.rst	Wed Oct  6 10:35:38 2010
@@ -285,9 +285,9 @@
    and ESMTP options suppressed.
 
    This method will return normally if the mail is accepted for at least one
-   recipient. Otherwise it will throw an exception.  That is, if this method does
-   not throw an exception, then someone should get your mail. If this method does
-   not throw an exception, it returns a dictionary, with one entry for each
+   recipient. Otherwise it will raise an exception.  That is, if this method does
+   not raise an exception, then someone should get your mail. If this method does
+   not raise an exception, it returns a dictionary, with one entry for each
    recipient that was refused.  Each entry contains a tuple of the SMTP error code
    and the accompanying error message sent by the server.
 

Modified: python/branches/release31-maint/Doc/library/string.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/string.rst	(original)
+++ python/branches/release31-maint/Doc/library/string.rst	Wed Oct  6 10:35:38 2010
@@ -163,7 +163,7 @@
       the format string (integers for positional arguments, and strings for
       named arguments), and a reference to the *args* and *kwargs* that was
       passed to vformat.  The set of unused args can be calculated from these
-      parameters.  :meth:`check_unused_args` is assumed to throw an exception if
+      parameters.  :meth:`check_unused_args` is assumed to raise an exception if
       the check fails.
 
    .. method:: format_field(value, format_spec)

Modified: python/branches/release31-maint/Doc/library/sys.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/sys.rst	(original)
+++ python/branches/release31-maint/Doc/library/sys.rst	Wed Oct  6 10:35:38 2010
@@ -762,7 +762,7 @@
       A C function has returned. *arg* is ``None``.
 
    ``'c_exception'``
-      A C function has thrown an exception.  *arg* is ``None``.
+      A C function has raised an exception.  *arg* is ``None``.
 
    Note that as an exception is propagated down the chain of callers, an
    ``'exception'`` event is generated at each level.

Modified: python/branches/release31-maint/Doc/library/urllib.parse.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/urllib.parse.rst	(original)
+++ python/branches/release31-maint/Doc/library/urllib.parse.rst	Wed Oct  6 10:35:38 2010
@@ -48,11 +48,11 @@
       >>> o.geturl()
       'http://www.cwi.nl:80/%7Eguido/Python.html'
 
-   If the scheme value is not specified, urlparse following the syntax
-   specifications from RFC 1808, expects the netloc value to start with '//',
-   Otherwise, it is not possible to distinguish between net_loc and path
-   component and would classify the indistinguishable component as path as in
-   a relative url.
+   If the scheme value is not specified, urlparse expects the netloc value to
+   start with '//', following the syntax specifications from :rfc:`1808`.
+   Otherwise, it is not possible to distinguish between netloc and path
+   components, and would the indistinguishable component would be classified
+   as the path as in a relative URL.
 
        >>> from urlparse import urlparse
        >>> urlparse('//www.cwi.nl:80/%7Eguido/Python.html')

Modified: python/branches/release31-maint/Doc/library/wsgiref.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/wsgiref.rst	(original)
+++ python/branches/release31-maint/Doc/library/wsgiref.rst	Wed Oct  6 10:35:38 2010
@@ -187,9 +187,7 @@
 .. class:: Headers(headers)
 
    Create a mapping-like object wrapping *headers*, which must be a list of header
-   name/value tuples as described in :pep:`333`.  Any changes made to the new
-   :class:`Headers` object will directly update the *headers* list it was created
-   with.
+   name/value tuples as described in :pep:`333`.
 
    :class:`Headers` objects support typical mapping operations including
    :meth:`__getitem__`, :meth:`get`, :meth:`__setitem__`, :meth:`setdefault`,

Modified: python/branches/release31-maint/Doc/library/xml.sax.reader.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/xml.sax.reader.rst	(original)
+++ python/branches/release31-maint/Doc/library/xml.sax.reader.rst	Wed Oct  6 10:35:38 2010
@@ -154,7 +154,7 @@
    Allow an application to set the locale for errors and warnings.
 
    SAX parsers are not required to provide localization for errors and warnings; if
-   they cannot support the requested locale, however, they must throw a SAX
+   they cannot support the requested locale, however, they must raise a SAX
    exception.  Applications may request a locale change in the middle of a parse.
 
 

Modified: python/branches/release31-maint/Doc/library/zipfile.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/zipfile.rst	(original)
+++ python/branches/release31-maint/Doc/library/zipfile.rst	Wed Oct  6 10:35:38 2010
@@ -12,10 +12,8 @@
 defined in `PKZIP Application Note
 <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_.
 
-This module does not currently handle multi-disk ZIP files, or ZIP files
-which have appended comments (although it correctly handles comments
-added to individual archive members---for which see the :ref:`zipinfo-objects`
-documentation). It can handle ZIP files that use the ZIP64 extensions
+This module does not currently handle multi-disk ZIP files.
+It can handle ZIP files that use the ZIP64 extensions
 (that is ZIP files that are more than 4 GByte in size).  It supports
 decryption of encrypted files in ZIP archives, but it currently cannot
 create an encrypted file.  Decryption is extremely slow as it is
@@ -64,7 +62,6 @@
 
    Returns ``True`` if *filename* is a valid ZIP file based on its magic number,
    otherwise returns ``False``.  *filename* may be a file or file-like object too.
-   This module does not currently handle ZIP files which have appended comments.
 
    .. versionchanged:: 3.1
       Support for file and file-like objects.

Modified: python/branches/release31-maint/Doc/tutorial/classes.rst
==============================================================================
--- python/branches/release31-maint/Doc/tutorial/classes.rst	(original)
+++ python/branches/release31-maint/Doc/tutorial/classes.rst	Wed Oct  6 10:35:38 2010
@@ -65,7 +65,7 @@
 A *namespace* is a mapping from names to objects.  Most namespaces are currently
 implemented as Python dictionaries, but that's normally not noticeable in any
 way (except for performance), and it may change in the future.  Examples of
-namespaces are: the set of built-in names (functions such as :func:`abs`, and
+namespaces are: the set of built-in names (containing functions such as :func:`abs`, and
 built-in exception names); the global names in a module; and the local names in
 a function invocation.  In a sense the set of attributes of an object also form
 a namespace.  The important thing to know about namespaces is that there is

Modified: python/branches/release31-maint/Doc/whatsnew/2.4.rst
==============================================================================
--- python/branches/release31-maint/Doc/whatsnew/2.4.rst	(original)
+++ python/branches/release31-maint/Doc/whatsnew/2.4.rst	Wed Oct  6 10:35:38 2010
@@ -1066,7 +1066,7 @@
   deprecated APIs and removes support for Python versions earlier than 2.3.  The
   3.0 version of the package uses a new incremental parser for MIME messages,
   available in the :mod:`email.FeedParser` module.  The new parser doesn't require
-  reading the entire message into memory, and doesn't throw exceptions if a
+  reading the entire message into memory, and doesn't raise exceptions if a
   message is malformed; instead it records any problems in the  :attr:`defect`
   attribute of the message.  (Developed by Anthony Baxter, Barry Warsaw, Thomas
   Wouters, and others.)

Modified: python/branches/release31-maint/Modules/selectmodule.c
==============================================================================
--- python/branches/release31-maint/Modules/selectmodule.c	(original)
+++ python/branches/release31-maint/Modules/selectmodule.c	Wed Oct  6 10:35:38 2010
@@ -915,10 +915,9 @@
 }
 
 PyDoc_STRVAR(pyepoll_register_doc,
-"register(fd[, eventmask]) -> bool\n\
+"register(fd[, eventmask]) -> None\n\
 \n\
-Registers a new fd or modifies an already registered fd. register() returns\n\
-True if a new fd was registered or False if the event mask for fd was modified.\n\
+Registers a new fd or modifies an already registered fd.\n\
 fd is the target file descriptor of the operation.\n\
 events is a bit set composed of the various EPOLL constants; the default\n\
 is EPOLL_IN | EPOLL_OUT | EPOLL_PRI.\n\

Modified: python/branches/release31-maint/README
==============================================================================
--- python/branches/release31-maint/README	(original)
+++ python/branches/release31-maint/README	Wed Oct  6 10:35:38 2010
@@ -55,7 +55,7 @@
 We try to have a comprehensive overview of the changes in the "What's New in
 Python 3.1" document, found at
 
-    http://docs.python.org/dev/3.1/whatsnew/3.1.html
+    http://docs.python.org/3.1/whatsnew/3.1.html
 
 For a more detailed change log, read Misc/NEWS (though this file, too,
 is incomplete, and also doesn't list anything merged in from the 2.7
@@ -70,7 +70,7 @@
 
 Documentation for Python 3.1 is online, updated twice a day:
 
-    http://docs.python.org/dev/3.1/
+    http://docs.python.org/3.1/
 
 All documentation is also available online at the Python web site
 (http://docs.python.org/, see below).  It is available online for
@@ -91,7 +91,7 @@
 A source-to-source translation tool, "2to3", can take care of the mundane task
 of converting large amounts of source code.  It is not a complete solution but
 is complemented by the deprecation warnings in 2.6.  See
-http://docs.python.org/dev/py3k/library/2to3.html for more information.
+http://docs.python.org/py3k/library/2to3.html for more information.
 
 
 Testing

Modified: python/branches/release31-maint/Tools/scripts/win_add2path.py
==============================================================================
--- python/branches/release31-maint/Tools/scripts/win_add2path.py	(original)
+++ python/branches/release31-maint/Tools/scripts/win_add2path.py	Wed Oct  6 10:35:38 2010
@@ -15,7 +15,7 @@
 HKCU = winreg.HKEY_CURRENT_USER
 ENV = "Environment"
 PATH = "PATH"
-DEFAULT = u"%PATH%"
+DEFAULT = "%PATH%"
 
 def modify():
     pythonpath = os.path.dirname(os.path.normpath(sys.executable))

Modified: python/branches/release31-maint/configure.in
==============================================================================
--- python/branches/release31-maint/configure.in	(original)
+++ python/branches/release31-maint/configure.in	Wed Oct  6 10:35:38 2010
@@ -2463,7 +2463,7 @@
 fi
 AC_MSG_RESULT($with_doc_strings)
 
-# Check for Python-specific malloc support
+# Check if eval loop should use timestamp counter profiling
 AC_MSG_CHECKING(for --with-tsc)
 AC_ARG_WITH(tsc,
 [  --with(out)-tsc         enable/disable timestamp counter profile], [


More information about the Python-checkins mailing list