https://github.com/python/cpython/commit/9e052619a6d32051394444c24d3185db1735a893
commit: 9e052619a6d32051394444c24d3185db1735a893
branch: main
author: Xie Yanbo <[email protected]>
committer: iritkatriel <[email protected]>
date: 2024-06-04T10:22:22Z
summary:

Fix typos in documentation and comments (#119763)

files:
M Python/brc.c
M Python/ceval.c
M Python/flowgraph.c
M Python/gc.c
M Python/import.c
M Python/optimizer.c
M Python/vm-state.md

diff --git a/Python/brc.c b/Python/brc.c
index 8f87bc33007bcf..d27687052aec19 100644
--- a/Python/brc.c
+++ b/Python/brc.c
@@ -14,7 +14,7 @@
 // thread states within each bucket.
 //
 // The queueing thread uses the eval breaker mechanism to notify the owning
-// thread that it has objects to merge. Additionaly, all queued objects are
+// thread that it has objects to merge. Additionally, all queued objects are
 // merged during GC.
 #include "Python.h"
 #include "pycore_object.h"      // _Py_ExplicitMergeRefcount
@@ -197,7 +197,7 @@ _Py_brc_after_fork(PyInterpreterState *interp)
 {
     // Unlock all bucket mutexes. Some of the buckets may be locked because
     // locks can be handed off to a parked thread (see lock.c). We don't have
-    // to worry about consistency here, becuase no thread can be actively
+    // to worry about consistency here, because no thread can be actively
     // modifying a bucket, but it might be paused (not yet woken up) on a
     // PyMutex_Lock while holding that lock.
     for (Py_ssize_t i = 0; i < _Py_BRC_NUM_BUCKETS; i++) {
diff --git a/Python/ceval.c b/Python/ceval.c
index 324d062fe9bb43..e3968b07486463 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1478,7 +1478,7 @@ initialize_locals(PyThreadState *tstate, PyFunctionObject 
*func,
         localsplus[total_args] = u;
     }
     else if (argcount > n) {
-        /* Too many postional args. Error is reported later */
+        /* Too many positional args. Error is reported later */
         for (j = n; j < argcount; j++) {
             Py_DECREF(args[j]);
         }
diff --git a/Python/flowgraph.c b/Python/flowgraph.c
index b0c8004130fb07..17617e119fdaa4 100644
--- a/Python/flowgraph.c
+++ b/Python/flowgraph.c
@@ -2861,7 +2861,7 @@ _PyCfg_OptimizedCfgToInstructionSequence(cfg_builder *g,
 }
 
 /* This is used by _PyCompile_Assemble to fill in the jump and exception
- * targets in a synthetic CFG (which is not the ouptut of the builtin 
compiler).
+ * targets in a synthetic CFG (which is not the output of the builtin 
compiler).
  */
 int
 _PyCfg_JumpLabelsToTargets(cfg_builder *g)
diff --git a/Python/gc.c b/Python/gc.c
index aa8b216124c36a..b87697e1e5ecfd 100644
--- a/Python/gc.c
+++ b/Python/gc.c
@@ -1,5 +1,5 @@
 //  This implements the reference cycle garbage collector.
-//  The Python module inteface to the collector is in gcmodule.c.
+//  The Python module interface to the collector is in gcmodule.c.
 //  See https://devguide.python.org/internals/garbage-collector/
 
 #include "Python.h"
@@ -1260,7 +1260,7 @@ gc_list_set_space(PyGC_Head *list, int space)
  * the incremental collector must progress through the old
  * space faster than objects are added to the old space.
  *
- * Each young or incremental collection adds a numebr of
+ * Each young or incremental collection adds a number of
  * objects, S (for survivors) to the old space, and
  * incremental collectors scan I objects from the old space.
  * I > S must be true. We also want I > S * N to be where
diff --git a/Python/import.c b/Python/import.c
index 6fe6df4db4f55e..351d463dcab465 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1961,7 +1961,7 @@ import_run_extension(PyThreadState *tstate, 
PyModInitFunction p0,
      *
      * However, for single-phase init the module's init function will
      * create the module, create other objects (and allocate other
-     * memory), populate it and its module state, and initialze static
+     * memory), populate it and its module state, and initialize static
      * types.  Some modules store other objects and data in global C
      * variables and register callbacks with the runtime/stdlib or
      * even external libraries (which is part of why we can't just
diff --git a/Python/optimizer.c b/Python/optimizer.c
index 5b4a6ff8cb3dad..4dc3438b6c23a4 100644
--- a/Python/optimizer.c
+++ b/Python/optimizer.c
@@ -1455,7 +1455,7 @@ PyUnstable_Optimizer_NewCounter(void)
 
 /* We use a bloomfilter with k = 6, m = 256
  * The choice of k and the following constants
- * could do with a more rigourous analysis,
+ * could do with a more rigorous analysis,
  * but here is a simple analysis:
  *
  * We want to keep the false positive rate low.
diff --git a/Python/vm-state.md b/Python/vm-state.md
index 4c68ba3b575cc8..b3246557dbeea3 100644
--- a/Python/vm-state.md
+++ b/Python/vm-state.md
@@ -87,4 +87,4 @@ Tier 2 IR entries are all the same size; there is no 
equivalent to `EXTENDED_ARG
 
 - **opcode**: Sometimes the same as a Tier 1 opcode, sometimes a separate 
micro opcode. Tier 2 opcodes are 9 bits (as opposed to Tier 1 opcodes, which 
fit in 8 bits). By convention, Tier 2 opcode names start with `_`.
 - **oparg**: The argument. Usually the same as the Tier 1 oparg after 
expansion of `EXTENDED_ARG` prefixes. Up to 32 bits.
-- **operand**: An aditional argument, Typically the value of *one* cache item 
from the Tier 1 inline cache, up to 64 bits.
+- **operand**: An additional argument, Typically the value of *one* cache item 
from the Tier 1 inline cache, up to 64 bits.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to