]> granicus.if.org Git - python/commitdiff
Issue #16714: use 'raise' exceptions, don't 'throw'.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Tue, 18 Dec 2012 19:27:37 +0000 (21:27 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Tue, 18 Dec 2012 19:27:37 +0000 (21:27 +0200)
Patch by Serhiy Storchaka.

34 files changed:
Doc/howto/cporting.rst
Lib/asyncore.py
Lib/distutils/tests/test_msvc9compiler.py
Lib/email/feedparser.py
Lib/email/header.py
Lib/httplib.py
Lib/io.py
Lib/lib-tk/Tkinter.py
Lib/logging/__init__.py
Lib/runpy.py
Lib/test/test_codeop.py
Lib/test/test_docxmlrpc.py
Lib/test/test_imaplib.py
Lib/test/test_minidom.py
Lib/test/test_os.py
Lib/test/test_pty.py
Lib/test/test_sax.py
Lib/test/test_signal.py
Lib/test/test_socketserver.py
Lib/test/test_sys_settrace.py
Lib/test/test_time.py
Lib/test/test_uu.py
Lib/test/test_winreg.py
Lib/test/test_zipfile.py
Lib/traceback.py
Lib/unittest/case.py
Lib/wsgiref/validate.py
Lib/xml/sax/_exceptions.py
Lib/xml/sax/xmlreader.py
Lib/xmlrpclib.py
Modules/_io/_iomodule.c
Modules/parsermodule.c
Modules/posixmodule.c
Tools/scripts/serve.py

index 6dd0765bd3391292d4c5a676a5a0cef74151549e..9d8a1b0e354c1caa5830107de95c96ed1c9db0b2 100644 (file)
@@ -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
index a281e786fb85aff1190169254d3a94c1580bcad1..29099bdf5c0bb24a4e06809b2167ad18222f1963 100644 (file)
@@ -393,7 +393,7 @@ class dispatcher:
             else:
                 return data
         except socket.error, why:
-            # winsock sometimes throws ENOTCONN
+            # winsock sometimes raises ENOTCONN
             if why.args[0] in _DISCONNECTED:
                 self.handle_close()
                 return ''
index 73470729fdbbbac2e7eada42b72676ca491bd0a1..2d94a1117e40c6e1309efd8702159c4f456a691d 100644 (file)
@@ -104,7 +104,7 @@ class msvc9compilerTestCase(support.TempdirManager,
                             unittest.TestCase):
 
     def test_no_compiler(self):
-        # makes sure query_vcvarsall throws
+        # makes sure query_vcvarsall raises
         # a DistutilsPlatformError if the compiler
         # is not found
         from distutils.msvc9compiler import query_vcvarsall
index 5ff266fa30aa45280627dc29a7b2f0b4f730ae86..15db26d22a275698dcf59fabe4f86c41fee6984d 100644 (file)
@@ -13,7 +13,7 @@ parser.  It returns when there's nothing more it can do with the available
 data.  When you have no more data to push into the parser, call .close().
 This completes the parsing and returns the root message object.
 
-The other advantage of this parser is that it will never throw a parsing
+The other advantage of this parser is that it will never raise a parsing
 exception.  Instead, when it finds something unexpected, it adds a 'defect' to
 the current message.  Defects are just instances that live on the message
 object's .defects attribute.
@@ -214,7 +214,7 @@ class FeedParser:
         # supposed to see in the body of the message.
         self._parse_headers(headers)
         # Headers-only parsing is a backwards compatibility hack, which was
-        # necessary in the older parser, which could throw errors.  All
+        # necessary in the older parser, which could raise errors.  All
         # remaining lines in the input are thrown into the message body.
         if self._headersonly:
             lines = []
index 2cf870fd575f9a3d8109d17ac3c30989f2b414db..b46d21d5aa1383b20839df0ef43f40ecfa5c1f2f 100644 (file)
@@ -103,7 +103,7 @@ def decode_header(header):
                         dec = email.base64mime.decode(encoded)
                     except binascii.Error:
                         # Turn this into a higher level exception.  BAW: Right
-                        # now we throw the lower level exception away but
+                        # now we raise the lower level exception away but
                         # when/if we get exception chaining, we'll preserve it.
                         raise HeaderParseError
                 if dec is None:
index 39a388e8051bb65c6ad45aee7f9a52b1eed4953b..9d11d04022051fbb3a4d2b86489a946567c00f17 100644 (file)
@@ -1068,7 +1068,7 @@ class HTTP:
         if port == 0:
             port = None
 
-        # Note that we may pass an empty string as the host; this will throw
+        # Note that we may pass an empty string as the host; this will raise
         # an error when we attempt to connect. Presumably, the client code
         # will call connect before then, with a proper host.
         self._setup(self._connection_class(host, port, strict))
index 57e6e0d675f84fb06b410fc3552beb06f24b36dd..22832766c4cc91f06bf39080f3a3b1836e81622b 100644 (file)
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -4,7 +4,7 @@ builtin open function is defined in this module.
 At the top of the I/O hierarchy is the abstract base 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 IOError if they do not support a given operation.
+allowed to raise an IOError if they do not support a given operation.
 
 Extending IOBase is RawIOBase which deals simply with the reading and
 writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide
index 4791950bbaca0dd46eb25f3cab0562cb8dbf7c84..e5c2e5181f11e01a94c9159bb55befa8423abbac 100644 (file)
@@ -155,7 +155,7 @@ def _tkerror(err):
     pass
 
 def _exit(code=0):
-    """Internal function. Calling it will throw the exception SystemExit."""
+    """Internal function. Calling it will raise the exception SystemExit."""
     try:
         code = int(code)
     except ValueError:
index d279ac700be98a98ac3ecfed6487661c66a22505..e53718d745773d1b61871ecca74723896217d491 100644 (file)
@@ -1251,7 +1251,7 @@ class Logger(Filterer):
         all the handlers of this logger to handle the record.
         """
         if _srcfile:
-            #IronPython doesn't track Python frames, so findCaller throws an
+            #IronPython doesn't track Python frames, so findCaller raises an
             #exception on some versions of IronPython. We trap it here so that
             #IronPython can use logging.
             try:
index f635c4bf1c3ef2d115895510dd1d9365f2484c4d..c4d7cc26a259bb0cc457a79af415435de1f4129f 100644 (file)
@@ -200,7 +200,7 @@ def _get_importer(path_name):
                 pass
         else:
             # The following check looks a bit odd. The trick is that
-            # NullImporter throws ImportError if the supplied path is a
+            # NullImporter raises ImportError if the supplied path is a
             # *valid* directory entry (and hence able to be handled
             # by the standard import machinery)
             try:
index 99fe6f933e26a1fb0e493ad08a6f359218510ccb..00cd3ceb76f23c08b155768121df7211ff5aec83 100644 (file)
@@ -50,7 +50,7 @@ class CodeopTests(unittest.TestCase):
         '''succeed iff str is the start of an invalid piece of code'''
         try:
             compile_command(str,symbol=symbol)
-            self.fail("No exception thrown for invalid code")
+            self.fail("No exception raised for invalid code")
         except SyntaxError:
             self.assertTrue(is_syntax)
         except OverflowError:
index 716333e67f672f61397cc7d9253a533f32404262..80d18036adf562669a759db62b5847d74972c8c1 100644 (file)
@@ -100,7 +100,7 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase):
         self.assertEqual(response.status, 200)
         self.assertEqual(response.getheader("Content-type"), "text/html")
 
-        # Server throws an exception if we don't start to read the data
+        # Server raises an exception if we don't start to read the data
         response.read()
 
     def test_invalid_get_response(self):
index 15b0ea0728663a30cd731f0684663636b9f89134..2b2213dea902f5c89fed6b349e1d82d607b0614f 100644 (file)
@@ -79,7 +79,7 @@ class SimpleIMAPHandler(SocketServer.StreamRequestHandler):
                         return
                     line += part
                 except IOError:
-                    # ..but SSLSockets throw exceptions.
+                    # ..but SSLSockets raise exceptions.
                     return
                 if line.endswith('\r\n'):
                     break
index 060c1a550d0e09c66c7e2b4011c6f9d9a6f6c818..ca0f0f77ebd1674d555e78d37b1d8bf6e84f5232 100644 (file)
@@ -1060,7 +1060,7 @@ class MinidomTest(unittest.TestCase):
                 '<?xml version="1.0" encoding="iso-8859-15"?><foo>\xa4</foo>',
                 "testEncodings - encoding EURO SIGN")
 
-        # Verify that character decoding errors throw exceptions instead
+        # Verify that character decoding errors raise exceptions instead
         # of crashing
         self.assertRaises(UnicodeDecodeError, parseString,
                 '<fran\xe7ais>Comment \xe7a va ? Tr\xe8s bien ?</fran\xe7ais>')
index 1d673f65202d6321264b1fada3b45a7a1fb25798..bdbeb0107bba1b1b4f04cd32950498a6675d0a6f 100644 (file)
@@ -214,33 +214,33 @@ class StatAttributeTests(unittest.TestCase):
 
         try:
             result[200]
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except IndexError:
             pass
 
         # Make sure that assignment fails
         try:
             result.st_mode = 1
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except (AttributeError, TypeError):
             pass
 
         try:
             result.st_rdev = 1
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except (AttributeError, TypeError):
             pass
 
         try:
             result.parrot = 1
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except AttributeError:
             pass
 
         # Use the stat_result constructor with a too-short tuple.
         try:
             result2 = os.stat_result((10,))
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except TypeError:
             pass
 
@@ -274,20 +274,20 @@ class StatAttributeTests(unittest.TestCase):
         # Make sure that assignment really fails
         try:
             result.f_bfree = 1
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except TypeError:
             pass
 
         try:
             result.parrot = 1
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except AttributeError:
             pass
 
         # Use the constructor with a too-short tuple.
         try:
             result2 = os.statvfs_result((10,))
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except TypeError:
             pass
 
index 623f23bf7ae747ecd3e856bb2d99cfbb208fe158..bec38c45456b9c0ac5a05c0d9c3831eef936ec83 100644 (file)
@@ -152,7 +152,7 @@ class PtyTest(unittest.TestCase):
             # platform-dependent amount of data is written to its fd.  On
             # Linux 2.6, it's 4000 bytes and the child won't block, but on OS
             # X even the small writes in the child above will block it.  Also
-            # on Linux, the read() will throw an OSError (input/output error)
+            # on Linux, the read() will raise an OSError (input/output error)
             # when it tries to read past the end of the buffer but the child's
             # already exited, so catch and discard those exceptions.  It's not
             # worth checking for EIO.
index adb9305c60c7655897e54c71a7fa52af1ac67723..c3b44f82dc4086519043d59416250c6de8558fb7 100644 (file)
@@ -294,7 +294,7 @@ class XmlgenTest(unittest.TestCase):
     def test_5027_1(self):
         # The xml prefix (as in xml:lang below) is reserved and bound by
         # definition to http://www.w3.org/XML/1998/namespace.  XMLGenerator had
-        # a bug whereby a KeyError is thrown because this namespace is missing
+        # a bug whereby a KeyError is raised because this namespace is missing
         # from a dictionary.
         #
         # This test demonstrates the bug by parsing a document.
@@ -320,7 +320,7 @@ class XmlgenTest(unittest.TestCase):
     def test_5027_2(self):
         # The xml prefix (as in xml:lang below) is reserved and bound by
         # definition to http://www.w3.org/XML/1998/namespace.  XMLGenerator had
-        # a bug whereby a KeyError is thrown because this namespace is missing
+        # a bug whereby a KeyError is raised because this namespace is missing
         # from a dictionary.
         #
         # This test demonstrates the bug by direct manipulation of the
index 8feb1455d0f8962d5ea8b755de81ecf68d6b1336..28037858b02c1c54c0b8a58ca59d9607a8047593 100644 (file)
@@ -109,7 +109,7 @@ class InterProcessSignalTests(unittest.TestCase):
             # This wait should be interrupted by the signal's exception.
             self.wait(child)
             time.sleep(1)  # Give the signal time to be delivered.
-            self.fail('HandlerBCalled exception not thrown')
+            self.fail('HandlerBCalled exception not raised')
         except HandlerBCalled:
             self.assertTrue(self.b_called)
             self.assertFalse(self.a_called)
@@ -148,7 +148,7 @@ class InterProcessSignalTests(unittest.TestCase):
         # test-running process from all the signals. It then
         # communicates with that child process over a pipe and
         # re-raises information about any exceptions the child
-        # throws. The real work happens in self.run_test().
+        # raises. The real work happens in self.run_test().
         os_done_r, os_done_w = os.pipe()
         with closing(os.fdopen(os_done_r)) as done_r, \
              closing(os.fdopen(os_done_w, 'w')) as done_w:
index 3b333bc7f5c0f4e23993191455012453b6e9284e..0dbb8e2ed0d72b1c1f3b6ed6c333d49feee578cc 100644 (file)
@@ -58,7 +58,7 @@ if HAVE_UNIX_SOCKETS:
 def simple_subprocess(testcase):
     pid = os.fork()
     if pid == 0:
-        # Don't throw an exception; it would be caught by the test harness.
+        # Don't raise an exception; it would be caught by the test harness.
         os._exit(72)
     yield None
     pid2, status = os.waitpid(pid, 0)
index 57a78391895be18dc97fa71fc18cf982f5a09beb..9c7bcef2e7e70a4a0ac70b9a9b7af36ff4835df3 100644 (file)
@@ -417,7 +417,7 @@ class RaisingTraceFuncTestCase(unittest.TestCase):
                 except ValueError:
                     pass
                 else:
-                    self.fail("exception not thrown!")
+                    self.fail("exception not raised!")
         except RuntimeError:
             self.fail("recursion counter not reset")
 
index 28917ca85684a31bc2879f3a771c49651b0d1f96..4571c108d6717701ccacc2aee7aa7e1347406a7c 100644 (file)
@@ -106,7 +106,7 @@ class TimeTestCase(unittest.TestCase):
 
     def test_strptime(self):
         # Should be able to go round-trip from strftime to strptime without
-        # throwing an exception.
+        # raising an exception.
         tt = time.gmtime(self.t)
         for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I',
                           'j', 'm', 'M', 'p', 'S',
index 95c9552cbeeb9688ca67ca46452aa82cc1a8276b..31046b07d5f87e80aafdcffaf0aca7162bb90b29 100644 (file)
@@ -48,7 +48,7 @@ class UUTest(unittest.TestCase):
         out = cStringIO.StringIO()
         try:
             uu.decode(inp, out)
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except uu.Error, e:
             self.assertEqual(str(e), "Truncated input file")
 
@@ -57,7 +57,7 @@ class UUTest(unittest.TestCase):
         out = cStringIO.StringIO()
         try:
             uu.decode(inp, out)
-            self.fail("No exception thrown")
+            self.fail("No exception raised")
         except uu.Error, e:
             self.assertEqual(str(e), "No valid begin line found in input file")
 
index bdf4e14b76584630b38febe5ff7b536243271ca2..c6268e1473d96fb8cb1a2b7e8da364c62203dbca 100644 (file)
@@ -234,7 +234,7 @@ class LocalWinregTests(BaseWinregTests):
 
     def test_changing_value(self):
         # Issue2810: A race condition in 2.6 and 3.1 may cause
-        # EnumValue or QueryValue to throw "WindowsError: More data is
+        # EnumValue or QueryValue to raise "WindowsError: More data is
         # available"
         done = False
 
@@ -282,7 +282,7 @@ class LocalWinregTests(BaseWinregTests):
 
     def test_dynamic_key(self):
         # Issue2810, when the value is dynamically generated, these
-        # throw "WindowsError: More data is available" in 2.6 and 3.1
+        # raise "WindowsError: More data is available" in 2.6 and 3.1
         try:
             EnumValue(HKEY_PERFORMANCE_DATA, 0)
         except OSError as e:
index 087a90acfd6ad0e73fbf2f0875de5e68b62b79af..9bd3b5834c240e5e56f92fdb9dd44aaaa9c7c7f8 100644 (file)
@@ -811,7 +811,7 @@ class OtherTests(unittest.TestCase):
         with zipfile.ZipFile(data, mode="w") as zipf:
             zipf.writestr("foo.txt", "O, for a Muse of Fire!")
 
-        # This is correct; calling .read on a closed ZipFile should throw
+        # This is correct; calling .read on a closed ZipFile should raise
         # a RuntimeError, and so should calling .testzip.  An earlier
         # version of .testzip would swallow this exception (and any other)
         # and report that the first file in the archive was corrupt.
index 8cb9e281fce5632862b69def93f5850728d3a4de..da17d3a1f8051ffb29e42babbe100a2d59dd2d3d 100644 (file)
@@ -166,7 +166,7 @@ def format_exception_only(etype, value):
     # >>> raise string1, string2  # deprecated
     #
     # Clear these out first because issubtype(string1, SyntaxError)
-    # would throw another exception and mask the original problem.
+    # would raise another exception and mask the original problem.
     if (isinstance(etype, BaseException) or
         isinstance(etype, types.InstanceType) or
         etype is None or type(etype) is str):
index 7017e9f4e849543bb2e293e7080de693be6e6a7c..6257936618a82e514d30fe9f1064c88be01fb5ce 100644 (file)
@@ -447,10 +447,10 @@ class TestCase(object):
 
 
     def assertRaises(self, excClass, callableObj=None, *args, **kwargs):
-        """Fail unless an exception of class excClass is thrown
+        """Fail unless an exception of class excClass is raised
            by callableObj when invoked with arguments args and keyword
            arguments kwargs. If a different type of exception is
-           thrown, it will not be caught, and the test case will be
+           raised, it will not be caught, and the test case will be
            deemed to have suffered an error, exactly as for an
            unexpected exception.
 
index 43784f9e660da51875a641d0e394bb9840b16cc8..04a893d7c614a351cd1ffda5d664cde764119dd3 100644 (file)
@@ -134,9 +134,9 @@ def validator(application):
     When applied between a WSGI server and a WSGI application, this
     middleware will check for WSGI compliancy on a number of levels.
     This middleware does not modify the request or response in any
-    way, but will throw an AssertionError if anything seems off
+    way, but will raise an AssertionError if anything seems off
     (except for a failure to close the application iterator, which
-    will be printed to stderr -- there's no way to throw an exception
+    will be printed to stderr -- there's no way to raise an exception
     at that point).
     """
 
index fdd614aee66586c1c4bd7bf8db3b28f47166ecc9..a9b2ba35c6a22b2e393b6a898780f025a9e15e0f 100644 (file)
@@ -12,7 +12,7 @@ class SAXException(Exception):
     the application: you can subclass it to provide additional
     functionality, or to add localization. Note that although you will
     receive a SAXException as the argument to the handlers in the
-    ErrorHandler interface, you are not actually required to throw
+    ErrorHandler interface, you are not actually required to raise
     the exception; instead, you can simply read the information in
     it."""
 
@@ -50,7 +50,7 @@ class SAXParseException(SAXException):
     the original XML document. Note that although the application will
     receive a SAXParseException as the argument to the handlers in the
     ErrorHandler interface, the application is not actually required
-    to throw the exception; instead, it can simply read the
+    to raise the exception; instead, it can simply read the
     information in it and take a different action.
 
     Since this exception is a subclass of SAXException, it inherits
@@ -62,7 +62,7 @@ class SAXParseException(SAXException):
         self._locator = locator
 
         # We need to cache this stuff at construction time.
-        # If this exception is thrown, the objects through which we must
+        # If this exception is raised, the objects through which we must
         # traverse to get this information may be deleted by the time
         # it gets caught.
         self._systemId = self._locator.getSystemId()
index 46ee02b4ec0e9f3424994b92bd5e10aad9b877a0..74aa39a7f1278584f89ccfd7b2f23c721fe3e6de 100644 (file)
@@ -68,7 +68,7 @@ class XMLReader:
 
         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 exception. Applications may
+        however, they must raise a SAX exception. Applications may
         request a locale change in the middle of a parse."""
         raise SAXNotSupportedException("Locale support not implemented")
 
index 653c424521acf0beef7ff7baa4e53ebe40f0b002..b93ea23b929750c43d737de3d9aca8ccc4da5062 100644 (file)
@@ -945,7 +945,7 @@ class _MultiCallMethod:
 
 class MultiCallIterator:
     """Iterates over the results of a multicall. Exceptions are
-    thrown in response to xmlrpc faults."""
+    raised in response to xmlrpc faults."""
 
     def __init__(self, results):
         self.results = results
index e356ea58df2f26d5bc8a689c07f729b6e072c9a9..d73dff2746ffd42b13e66577ad634bbe623c412d 100644 (file)
@@ -59,7 +59,7 @@ PyDoc_STRVAR(module_doc,
 "At the top of the I/O hierarchy is the abstract base class IOBase. It\n"
 "defines the basic interface to a stream. Note, however, that there is no\n"
 "separation between reading and writing to streams; implementations are\n"
-"allowed to throw an IOError if they do not support a given operation.\n"
+"allowed to raise an IOError if they do not support a given operation.\n"
 "\n"
 "Extending IOBase is RawIOBase which deals simply with the reading and\n"
 "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n"
index 8e581c234f5c10e62b611e6d573cb547886fa634..eb2d600689901a8d8f82c4246bd8997e7f05e5da 100644 (file)
@@ -698,7 +698,7 @@ parser_tuple2st(PyST_Object *self, PyObject *args, PyObject *kw)
             err_string("parse tree does not use a valid start symbol");
         }
     }
-    /*  Make sure we throw an exception on all errors.  We should never
+    /*  Make sure we raise an exception on all errors.  We should never
      *  get this, but we'd do well to be sure something is done.
      */
     if (st == NULL && !PyErr_Occurred())
@@ -813,7 +813,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num)
         else if (!ISNONTERMINAL(type)) {
             /*
              *  It has to be one or the other; this is an error.
-             *  Throw an exception.
+             *  Raise an exception.
              */
             PyObject *err = Py_BuildValue("os", elem, "unknown node type.");
             PyErr_SetObject(parser_error, err);
@@ -863,7 +863,7 @@ build_node_tree(PyObject *tuple)
     if (ISTERMINAL(num)) {
         /*
          *  The tuple is simple, but it doesn't start with a start symbol.
-         *  Throw an exception now and be done with it.
+         *  Raise an exception now and be done with it.
          */
         tuple = Py_BuildValue("os", tuple,
                     "Illegal syntax-tree; cannot start with terminal symbol.");
index ea810ecaea8fc62c89a106c8193bf15e26a9a805..21a6739d21762376be277f5b62ed90699ab6f15a 100644 (file)
@@ -349,7 +349,7 @@ extern int lstat(const char *, struct stat *);
 
 #if defined _MSC_VER && _MSC_VER >= 1400
 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is
- * valid and throw an assertion if it isn't.
+ * valid and raise an assertion if it isn't.
  * Normally, an invalid fd is likely to be a C program error and therefore
  * an assertion can be useful, but it does contradict the POSIX standard
  * which for write(2) states:
index 50061d5ad3bd8c59775637210ebc59584702344d..399da1aa64ebe18ce0fe69738d6a95b46ee977fd 100755 (executable)
@@ -2,7 +2,7 @@
 '''
 Small wsgiref based web server. Takes a path to serve from and an
 optional port number (defaults to 8000), then tries to serve files.
-Mime types are guessed from the file names, 404 errors are thrown
+Mime types are guessed from the file names, 404 errors are raised
 if the file is not found. Used for the make serve target in Doc.
 '''
 import sys