]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos in the Python directory (GH-28767)
authorChristian Clauss <cclauss@me.com>
Wed, 6 Oct 2021 22:55:27 +0000 (00:55 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Oct 2021 22:55:27 +0000 (15:55 -0700)
Python/compile.c
Python/fileutils.c
Python/import.c
Python/initconfig.c
Python/pathconfig.c
Python/pythonrun.c
Python/specialize.c

index 2d82d6a1e5a91818b02d990ae8904ac14a335c77..0c025acec149140518d828386a6b5c7637861bbe 100644 (file)
@@ -6335,7 +6335,7 @@ compiler_pattern_or(struct compiler *c, pattern_ty p, pattern_context *pc)
                     // cases, though.
                     assert(istores < icontrol);
                     Py_ssize_t rotations = istores + 1;
-                    // Perfom the same rotation on pc->stores:
+                    // Perform the same rotation on pc->stores:
                     PyObject *rotated = PyList_GetSlice(pc->stores, 0,
                                                         rotations);
                     if (rotated == NULL ||
@@ -7326,7 +7326,7 @@ consts_dict_keys_inorder(PyObject *dict)
         return NULL;
     while (PyDict_Next(dict, &pos, &k, &v)) {
         i = PyLong_AS_LONG(v);
-        /* The keys of the dictionary can be tuples wrapping a contant.
+        /* The keys of the dictionary can be tuples wrapping a constant.
          * (see compiler_add_o and _PyCode_ConstantKey). In that case
          * the object we want is always second. */
         if (PyTuple_CheckExact(k)) {
index ecfdc5758eb84fbcb7c95f4b8a51118cdcfddb84..a36415946e2184499f629f89e5ba20371de67f6a 100644 (file)
@@ -221,7 +221,7 @@ check_force_ascii(void)
         ch = (unsigned char)0xA7;
         res = _Py_mbstowcs(&wch, (char*)&ch, 1);
         if (res != DECODE_ERROR && wch == L'\xA7') {
-            /* On HP-UX withe C locale or the POSIX locale,
+            /* On HP-UX with C locale or the POSIX locale,
                nl_langinfo(CODESET) announces "roman8", whereas mbstowcs() uses
                Latin1 encoding in practice. Force ASCII in this case.
 
index a6170a39c7fdbd87de8e38ff68bd28e2c3db215b..731f0f59118d6fddfa43082c6b4139245398932c 100644 (file)
@@ -2458,7 +2458,7 @@ _PyImport_BootstrapImp(PyThreadState *tstate)
     // Mock a ModuleSpec object just good enough for PyModule_FromDefAndSpec():
     // an object with just a name attribute.
     //
-    // _imp.__spec__ is overriden by importlib._bootstrap._instal() anyway.
+    // _imp.__spec__ is overridden by importlib._bootstrap._instal() anyway.
     PyObject *attrs = Py_BuildValue("{sO}", "name", name);
     if (attrs == NULL) {
         goto error;
index 9fa202a7da5c027d68157032266bc2c1d2f5d3fe..2e3cde83b2534e1413187ee38bf0764ddd7bd9f7 100644 (file)
@@ -98,7 +98,7 @@ static const char usage_3[] = "\
          -X no_debug_ranges: disable the inclusion of the tables mapping extra location \n\
             information (end line, start column offset and end column offset) to every \n\
             instruction in code objects. This is useful when smaller code objects and pyc \n\
-            files are desired as well as supressing the extra visual location indicators \n\
+            files are desired as well as suppressing the extra visual location indicators \n\
             when the interpreter displays tracebacks.\n\
          -X frozen_modules=[on|off]: whether or not frozen modules should be used.\n\
             The default is \"on\" (or \"off\" if you are running a local build).\n\
@@ -142,7 +142,7 @@ static const char usage_6[] =
 "PYTHONNODEBUGRANGES: If this variable is set, it disables the inclusion of the \n"
 "   tables mapping extra location information (end line, start column offset \n"
 "   and end column offset) to every instruction in code objects. This is useful \n"
-"   when smaller cothe de objects and pyc files are desired as well as supressing the \n"
+"   when smaller cothe de objects and pyc files are desired as well as suppressing the \n"
 "   extra visual location indicators when the interpreter displays tracebacks.\n";
 
 #if defined(MS_WINDOWS)
@@ -2549,7 +2549,7 @@ warnoptions_append(PyConfig *config, PyWideStringList *options,
 {
     /* config_init_warnoptions() add existing config warnoptions at the end:
        ensure that the new option is not already present in this list to
-       prevent change the options order whne config_init_warnoptions() is
+       prevent change the options order when config_init_warnoptions() is
        called twice. */
     if (_PyWideStringList_Find(&config->warnoptions, option)) {
         /* Already present: do nothing */
index d49bd3c854940d4077559982fa6d876c2f500363..2ebb9d39b8c2cf653c5a4273cf40e730d59b6195 100644 (file)
@@ -411,7 +411,7 @@ config_init_pathconfig(PyConfig *config, int compute_path_config)
 #undef COPY_ATTR
 
 #ifdef MS_WINDOWS
-    /* If a ._pth file is found: isolated and site_import are overriden */
+    /* If a ._pth file is found: isolated and site_import are overridden */
     if (pathconfig.isolated != -1) {
         config->isolated = pathconfig.isolated;
     }
index 0e0262c0e8c69f1d7fec28c7fa93f234eb858701..6cecef97932288f29102c5fab051d7b2ef4e1d40 100644 (file)
@@ -2,7 +2,7 @@
 /* Top level execution of Python code (including in __main__) */
 
 /* To help control the interfaces between the startup, execution and
- * shutdown code, the phases are split across separate modules (boostrap,
+ * shutdown code, the phases are split across separate modules (bootstrap,
  * pythonrun, shutdown)
  */
 
@@ -943,7 +943,7 @@ print_exception(PyObject *f, PyObject *value)
                 if (end_lineno > lineno) {
                     end_offset = (error_line != NULL) ? line_size : -1;
                 }
-                // Limit the ammount of '^' that we can display to
+                // Limit the amount of '^' that we can display to
                 // the size of the text in the source line.
                 if (error_line != NULL && end_offset > line_size + 1) {
                     end_offset = line_size + 1;
index 1ab79bf3ea0c5d2bacfb3c2957ac201056e69372..4e025384a6252d13596d9723be7763c5626069a6 100644 (file)
@@ -588,7 +588,7 @@ specialize_dict_access(
 {
     assert(kind == NON_OVERRIDING || kind == NON_DESCRIPTOR || kind == ABSENT ||
         kind == BUILTIN_CLASSMETHOD || kind == PYTHON_CLASSMETHOD);
-    // No desciptor, or non overriding.
+    // No descriptor, or non overriding.
     if (type->tp_dictoffset < 0) {
         SPECIALIZATION_FAIL(base_op, SPEC_FAIL_OUT_OF_RANGE);
         return 0;