summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 19:27:16 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 19:27:16 (GMT)
commita19195984922ce89e7695c93b3bb45c3e0e6d732 (patch)
tree2cbafae7aa7aa368583be6216a0c23bce0774a0f /Doc
parentf61dc4cea24c2e994dc11947a6d67708af87ce50 (diff)
parent5b89840d9cf11014a4b865d79497649f74bf2866 (diff)
downloadcpython-a19195984922ce89e7695c93b3bb45c3e0e6d732.zip
cpython-a19195984922ce89e7695c93b3bb45c3e0e6d732.tar.gz
cpython-a19195984922ce89e7695c93b3bb45c3e0e6d732.tar.bz2
Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/howto/cporting.rst2
-rw-r--r--Doc/library/contextlib.rst2
-rw-r--r--Doc/library/imaplib.rst2
-rw-r--r--Doc/library/os.rst8
4 files changed, 7 insertions, 7 deletions
diff --git a/Doc/howto/cporting.rst b/Doc/howto/cporting.rst
index 6dd0765..9d8a1b0 100644
--- a/Doc/howto/cporting.rst
+++ b/Doc/howto/cporting.rst
@@ -253,7 +253,7 @@ behave slightly differently from real Capsules. Specifically:
* :c:func:`PyCapsule_GetName` always returns NULL.
- * :c:func:`PyCapsule_SetName` always throws an exception and
+ * :c:func:`PyCapsule_SetName` always raises an exception and
returns failure. (Since there's no way to store a name
in a CObject, noisy failure of :c:func:`PyCapsule_SetName`
was deemed preferable to silent failure here. If this is
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index ed9ebb8..41dfded 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -184,7 +184,7 @@ Functions and classes provided:
files = [stack.enter_context(open(fname)) for fname in filenames]
# All opened files will automatically be closed at the end of
# the with statement, even if attempts to open files later
- # in the list throw an exception
+ # in the list raise an exception
Each instance maintains a stack of registered callbacks that are called in
reverse order when the instance is closed (either explicitly or implicitly
diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst
index fefb284..626f661 100644
--- a/Doc/library/imaplib.rst
+++ b/Doc/library/imaplib.rst
@@ -75,7 +75,7 @@ There's also a subclass for secure connections:
:class:`ssl.SSLContext` object which allows bundling SSL configuration
options, certificates and private keys into a single (potentially long-lived)
structure. Note that the *keyfile*/*certfile* parameters are mutually exclusive with *ssl_context*,
- a :class:`ValueError` is thrown if *keyfile*/*certfile* is provided along with *ssl_context*.
+ a :class:`ValueError` is raised if *keyfile*/*certfile* is provided along with *ssl_context*.
.. versionchanged:: 3.3
*ssl_context* parameter added.
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index a82b401..d2f7d01 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1171,7 +1171,7 @@ Querying the size of a terminal
output) specifies which file descriptor should be queried.
If the file descriptor is not connected to a terminal, an :exc:`OSError`
- is thrown.
+ is raised.
:func:`shutil.get_terminal_size` is the high-level function which
should normally be used, ``os.get_terminal_size`` is the low-level
@@ -1945,7 +1945,7 @@ features:
:mod:`os` module permit use of their *dir_fd* parameter. Different platforms
provide different functionality, and an option that might work on one might
be unsupported on another. For consistency's sakes, functions that support
- *dir_fd* always allow specifying the parameter, but will throw an exception
+ *dir_fd* always allow specifying the parameter, but will raise an exception
if the functionality is not actually available.
To check whether a particular function permits use of its *dir_fd*
@@ -1986,7 +1986,7 @@ features:
descriptor. Different platforms provide different functionality, and an
option that might work on one might be unsupported on another. For
consistency's sakes, functions that support *fd* always allow specifying
- the parameter, but will throw an exception if the functionality is not
+ the parameter, but will raise an exception if the functionality is not
actually available.
To check whether a particular function permits specifying an open file
@@ -2007,7 +2007,7 @@ features:
platforms provide different functionality, and an option that might work on
one might be unsupported on another. For consistency's sakes, functions that
support *follow_symlinks* always allow specifying the parameter, but will
- throw an exception if the functionality is not actually available.
+ raise an exception if the functionality is not actually available.
To check whether a particular function permits use of its *follow_symlinks*
parameter, use the ``in`` operator on ``supports_follow_symlinks``. As an