[Python-checkins] r83659 - in python/branches/py3k/Doc: c-api/init.rst howto/doanddont.rst library/bdb.rst library/doctest.rst library/email.errors.rst library/html.parser.rst library/io.rst library/linecache.rst library/mmap.rst library/parser.rst library/pyexpat.rst library/smtplib.rst library/string.rst library/sys.rst library/xml.sax.reader.rst whatsnew/2.4.rst whatsnew/3.2.rst

georg.brandl python-checkins at python.org
Tue Aug 3 14:06:29 CEST 2010


Author: georg.brandl
Date: Tue Aug  3 14:06:29 2010
New Revision: 83659

Log:
Terminology fix: exceptions are raised, except in generator.throw().

Modified:
   python/branches/py3k/Doc/c-api/init.rst
   python/branches/py3k/Doc/howto/doanddont.rst
   python/branches/py3k/Doc/library/bdb.rst
   python/branches/py3k/Doc/library/doctest.rst
   python/branches/py3k/Doc/library/email.errors.rst
   python/branches/py3k/Doc/library/html.parser.rst
   python/branches/py3k/Doc/library/io.rst
   python/branches/py3k/Doc/library/linecache.rst
   python/branches/py3k/Doc/library/mmap.rst
   python/branches/py3k/Doc/library/parser.rst
   python/branches/py3k/Doc/library/pyexpat.rst
   python/branches/py3k/Doc/library/smtplib.rst
   python/branches/py3k/Doc/library/string.rst
   python/branches/py3k/Doc/library/sys.rst
   python/branches/py3k/Doc/library/xml.sax.reader.rst
   python/branches/py3k/Doc/whatsnew/2.4.rst
   python/branches/py3k/Doc/whatsnew/3.2.rst

Modified: python/branches/py3k/Doc/c-api/init.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/init.rst	(original)
+++ python/branches/py3k/Doc/c-api/init.rst	Tue Aug  3 14:06:29 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/py3k/Doc/howto/doanddont.rst
==============================================================================
--- python/branches/py3k/Doc/howto/doanddont.rst	(original)
+++ python/branches/py3k/Doc/howto/doanddont.rst	Tue Aug  3 14:06:29 2010
@@ -154,7 +154,7 @@
 
 Consider the case the file gets deleted between the time the call to
 :func:`os.path.exists` is made and the time :func:`open` is called. That means
-the last line will throw an :exc:`IOError`. The same would happen if *file*
+the last line will raise an :exc:`IOError`. The same would happen if *file*
 exists but has no read permission. Since testing this on a normal machine on
 existing and non-existing files make it seem bugless, that means in testing the
 results will seem fine, and the code will get shipped. Then an unhandled

Modified: python/branches/py3k/Doc/library/bdb.rst
==============================================================================
--- python/branches/py3k/Doc/library/bdb.rst	(original)
+++ python/branches/py3k/Doc/library/bdb.rst	Tue Aug  3 14:06:29 2010
@@ -116,7 +116,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/py3k/Doc/library/doctest.rst
==============================================================================
--- python/branches/py3k/Doc/library/doctest.rst	(original)
+++ python/branches/py3k/Doc/library/doctest.rst	Tue Aug  3 14:06:29 2010
@@ -1673,7 +1673,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.
 
@@ -1697,9 +1697,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/py3k/Doc/library/email.errors.rst
==============================================================================
--- python/branches/py3k/Doc/library/email.errors.rst	(original)
+++ python/branches/py3k/Doc/library/email.errors.rst	Tue Aug  3 14:06:29 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/py3k/Doc/library/html.parser.rst
==============================================================================
--- python/branches/py3k/Doc/library/html.parser.rst	(original)
+++ python/branches/py3k/Doc/library/html.parser.rst	Tue Aug  3 14:06:29 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/py3k/Doc/library/io.rst
==============================================================================
--- python/branches/py3k/Doc/library/io.rst	(original)
+++ python/branches/py3k/Doc/library/io.rst	Tue Aug  3 14:06:29 2010
@@ -17,7 +17,7 @@
 At the top of the I/O hierarchy is the abstract base class :class:`IOBase`.  It
 defines the basic interface to a stream.  Note, however, that there is no
 separation between reading and writing to streams; implementations are allowed
-to throw an :exc:`IOError` if they do not support a given operation.
+to raise an :exc:`IOError` if they do not support a given operation.
 
 Extending :class:`IOBase` is :class:`RawIOBase` which deals simply with the
 reading and writing of raw bytes to a stream.  :class:`FileIO` subclasses

Modified: python/branches/py3k/Doc/library/linecache.rst
==============================================================================
--- python/branches/py3k/Doc/library/linecache.rst	(original)
+++ python/branches/py3k/Doc/library/linecache.rst	Tue Aug  3 14:06:29 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/py3k/Doc/library/mmap.rst
==============================================================================
--- python/branches/py3k/Doc/library/mmap.rst	(original)
+++ python/branches/py3k/Doc/library/mmap.rst	Tue Aug  3 14:06:29 2010
@@ -184,7 +184,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)
@@ -210,7 +210,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]])
@@ -245,7 +245,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)
@@ -253,4 +253,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/py3k/Doc/library/parser.rst
==============================================================================
--- python/branches/py3k/Doc/library/parser.rst	(original)
+++ python/branches/py3k/Doc/library/parser.rst	Tue Aug  3 14:06:29 2010
@@ -114,7 +114,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)
@@ -122,7 +122,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)
@@ -132,9 +132,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
@@ -259,8 +259,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
@@ -268,7 +268,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/py3k/Doc/library/pyexpat.rst
==============================================================================
--- python/branches/py3k/Doc/library/pyexpat.rst	(original)
+++ python/branches/py3k/Doc/library/pyexpat.rst	Tue Aug  3 14:06:29 2010
@@ -429,7 +429,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.
 
@@ -446,7 +446,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/py3k/Doc/library/smtplib.rst
==============================================================================
--- python/branches/py3k/Doc/library/smtplib.rst	(original)
+++ python/branches/py3k/Doc/library/smtplib.rst	Tue Aug  3 14:06:29 2010
@@ -284,9 +284,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/py3k/Doc/library/string.rst
==============================================================================
--- python/branches/py3k/Doc/library/string.rst	(original)
+++ python/branches/py3k/Doc/library/string.rst	Tue Aug  3 14:06:29 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/py3k/Doc/library/sys.rst
==============================================================================
--- python/branches/py3k/Doc/library/sys.rst	(original)
+++ python/branches/py3k/Doc/library/sys.rst	Tue Aug  3 14:06:29 2010
@@ -843,7 +843,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/py3k/Doc/library/xml.sax.reader.rst
==============================================================================
--- python/branches/py3k/Doc/library/xml.sax.reader.rst	(original)
+++ python/branches/py3k/Doc/library/xml.sax.reader.rst	Tue Aug  3 14:06:29 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/py3k/Doc/whatsnew/2.4.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/2.4.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/2.4.rst	Tue Aug  3 14:06:29 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/py3k/Doc/whatsnew/3.2.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.2.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.2.rst	Tue Aug  3 14:06:29 2010
@@ -114,7 +114,7 @@
 
   * *ignore_dangling_symlinks*: when ``symlinks=False`` (meaning that the
     function copies the file pointed to by the symlink, not the symlink
-    itself) this option will silence the error thrown if the file doesn't
+    itself) this option will silence the error raised if the file doesn't
     exist.
 
   * *copy_function*: a callable that will be used to copy files.


More information about the Python-checkins mailing list