]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in docs, error messages and comments (#122502)
authorjianghuyiyuan <shuangcui@live.com>
Thu, 1 Aug 2024 00:26:09 +0000 (09:26 +0900)
committerGitHub <noreply@github.com>
Thu, 1 Aug 2024 00:26:09 +0000 (00:26 +0000)
Signed-off-by: jianghuyiyuan <shuangcui@live.com>
Doc/howto/isolating-extensions.rst
Doc/library/threading.rst
Doc/using/configure.rst
Include/internal/pycore_freelist_state.h
Lib/test/test_webbrowser.py
Python/crossinterp.c

index e35855deedbe5fa1facb6bb700f95bae59246c83..a636e06bda834410e5d0c3e07f1c0b466cda830c 100644 (file)
@@ -339,7 +339,7 @@ That is, heap types should:
 - Define a traverse function using ``Py_tp_traverse``, which
   visits the type (e.g. using ``Py_VISIT(Py_TYPE(self))``).
 
-Please refer to the the documentation of
+Please refer to the documentation of
 :c:macro:`Py_TPFLAGS_HAVE_GC` and :c:member:`~PyTypeObject.tp_traverse`
 for additional considerations.
 
index 49c2b9b3ccd4fdf7cbb8084c13682fee922a98d4..cb82fea377697b587855aa36514c691e37f032cc 100644 (file)
@@ -1018,7 +1018,7 @@ method.  The :meth:`~Event.wait` method blocks until the flag is true.
       has not expired. The return value represents the
       reason that this blocking method returned; ``True`` if returning because
       the internal flag is set to true, or ``False`` if a timeout is given and
-      the the internal flag did not become true within the given wait time.
+      the internal flag did not become true within the given wait time.
 
       When the timeout argument is present and not ``None``, it should be a
       floating-point number specifying a timeout for the operation in seconds,
index 32adfb0ba6e5fc3a9ef6a621780c7a522d03f841..6a4a52bb6e8b12035820a78c9a56aa2a33ec8ce7 100644 (file)
@@ -1120,7 +1120,7 @@ Remove built files.
 make distclean
 ^^^^^^^^^^^^^^
 
-In addition to the the work done by ``make clean``, remove files
+In addition to the work done by ``make clean``, remove files
 created by the configure script.  ``configure`` will have to be run
 before building again. [#]_
 
index edf79dd7521c4141468d3ec3fb4593c70631b002..e8df784bcba06e817f9928e269d6b7045114d6fe 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
 
 // A generic freelist of either PyObjects or other data structures.
 struct _Py_freelist {
-    // Entries are linked together using the first word of the the object.
+    // Entries are linked together using the first word of the object.
     // For PyObjects, this overlaps with the `ob_refcnt` field or the `ob_tid`
     // field.
     void *freelist;
index ae8d776e8413ffcd870601994def48d69bab8b16..4fcbc5c2e59ea311fe5fa7a40b638f0a86900a63 100644 (file)
@@ -244,7 +244,7 @@ class IOSBrowserTest(unittest.TestCase):
     @unittest.skipIf(getattr(webbrowser, "objc", None) is None,
                      "iOS Webbrowser tests require ctypes")
     def setUp(self):
-        # Intercept the the objc library. Wrap the calls to get the
+        # Intercept the objc library. Wrap the calls to get the
         # references to classes and selectors to return strings, and
         # wrap msgSend to return stringified object references
         self.orig_objc = webbrowser.objc
index acb372af42408e74b4960a510fa201cc0cc7cbe2..0aca322d987dbadd06929c35e37aa04209ac86fe 100644 (file)
@@ -699,7 +699,7 @@ _PyXI_excinfo_InitFromException(_PyXI_excinfo *info, PyObject *exc)
         Py_DECREF(tbexc);
         if (info->errdisplay == NULL) {
 #ifdef Py_DEBUG
-            PyErr_FormatUnraisable("Exception ignored while formating TracebackException");
+            PyErr_FormatUnraisable("Exception ignored while formatting TracebackException");
 #endif
             PyErr_Clear();
         }