]> granicus.if.org Git - python/commitdiff
Let’s keep “throw” for the generator method and use “raise” elsewhere.
authorÉric Araujo <merwok@netwok.org>
Tue, 30 Nov 2010 17:20:31 +0000 (17:20 +0000)
committerÉric Araujo <merwok@netwok.org>
Tue, 30 Nov 2010 17:20:31 +0000 (17:20 +0000)
Doc/library/configparser.rst
Doc/library/os.rst
Doc/library/parser.rst
Doc/library/urllib.parse.rst

index 070328def54354703901c2ffa5149f698cee4810..df7a1de15c4c6c85be84cc1a8afa4b582d218dc1 100644 (file)
@@ -320,7 +320,7 @@ However, there are a few differences that should be taken into account:
   the default value to be visible again.  Trying to delete a default value
   causes a ``KeyError``.
 
-* Trying to delete the ``DEFAULTSECT`` throws ``ValueError``.
+* Trying to delete the ``DEFAULTSECT`` raises ``ValueError``.
 
 * There are two parser-level methods in the legacy API that hide the dictionary
   interface and are incompatible:
index b2c439c2eb6b9866f3c0af8f1b2f047f74833fd7..f3aad1984396520dd82d319c4a9992f4ab1fe2bb 100644 (file)
@@ -1150,7 +1150,7 @@ Files and Directories
       single: UNC paths; and os.makedirs()
 
    Recursive directory creation function.  Like :func:`mkdir`, but makes all
-   intermediate-level directories needed to contain the leaf directory.  Throws
+   intermediate-level directories needed to contain the leaf directory.  Raises
    an :exc:`error` exception if the leaf directory already exists or cannot be
    created.  The default *mode* is ``0o777`` (octal).  On some systems, *mode*
    is ignored. Where it is used, the current umask value is first masked out.
index ad336d34c16865b662f99ac114025c21c687cf51..3e1e31bc791e4b731fa845be627dfe90f426611d 100644 (file)
@@ -268,7 +268,7 @@ function for information about the exceptions it can raise.
    will only need to be aware of the simple string values.
 
 Note that the functions :func:`compilest`, :func:`expr`, and :func:`suite` may
-raise exceptions which are normally thrown by the parsing and compilation
+raise exceptions which are normally raised 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.
index eab218e0c3e2d1158d9b1cc849ecb3776f0c3527..4528c404427e700548da2af808dad2a3f71429e4 100644 (file)
@@ -283,7 +283,7 @@ passed in, the result will contain only :class:`bytes` data.
 
 Attempting to mix :class:`str` data with :class:`bytes` or
 :class:`bytearray` in a single function call will result in a
-:exc:`TypeError` being thrown, while attempting to pass in non-ASCII
+:exc:`TypeError` being raised, while attempting to pass in non-ASCII
 byte values will trigger :exc:`UnicodeDecodeError`.
 
 To support easier conversion of result objects between :class:`str` and