Skip to content

Commit dd02a69

Browse files
authored
Fix typos in the Modules directory (pythonGH-28761)
1 parent 5baec4a commit dd02a69

19 files changed

+21
-21
lines changed

Modules/_csv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
489489
}
490490

491491
/* Since dialect is now a heap type, it inherits pickling method for
492-
* protocol 0 and 1 from object, therefore it needs to be overriden */
492+
* protocol 0 and 1 from object, therefore it needs to be overridden */
493493

494494
PyDoc_STRVAR(dialect_reduce_doc, "raises an exception to avoid pickling");
495495

Modules/_ctypes/callproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ static int _call_function_pointer(int flags,
834834
# define HAVE_FFI_PREP_CIF_VAR_RUNTIME false
835835
# endif
836836

837-
/* Even on Apple-arm64 the calling convention for variadic functions conincides
837+
/* Even on Apple-arm64 the calling convention for variadic functions coincides
838838
* with the standard calling convention in the case that the function called
839839
* only with its fixed arguments. Thus, we do not need a special flag to be
840840
* set on variadic functions. We treat a function as variadic if it is called

Modules/_ctypes/cfield.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ PyCField_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
3535
* Expects the size, index and offset for the current field in *psize and
3636
* *poffset, stores the total size so far in *psize, the offset for the next
3737
* field in *poffset, the alignment requirements for the current field in
38-
* *palign, and returns a field desriptor for this field.
38+
* *palign, and returns a field descriptor for this field.
3939
*/
4040
/*
4141
* bitfields extension:

Modules/_ctypes/ctypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ typedef struct {
208208
PyObject *checker;
209209
int flags; /* calling convention and such */
210210

211-
/* pep3118 fields, pointers neeed PyMem_Free */
211+
/* pep3118 fields, pointers need PyMem_Free */
212212
char *format;
213213
int ndim;
214214
Py_ssize_t *shape;

Modules/_pickle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4527,7 +4527,7 @@ dump(PicklerObject *self, PyObject *obj)
45274527
* call when setting the reducer_override attribute of the Pickler instance
45284528
* to a bound method of the same instance. This is important as the Pickler
45294529
* instance holds a reference to each object it has pickled (through its
4530-
* memo): thus, these objects wont be garbage-collected as long as the
4530+
* memo): thus, these objects won't be garbage-collected as long as the
45314531
* Pickler itself is not collected. */
45324532
Py_CLEAR(self->reducer_override);
45334533
return status;
@@ -6540,7 +6540,7 @@ do_setitems(UnpicklerObject *self, Py_ssize_t x)
65406540
return 0;
65416541
if ((len - x) % 2 != 0) {
65426542
PickleState *st = _Pickle_GetGlobalState();
6543-
/* Currupt or hostile pickle -- we never write one like this. */
6543+
/* Corrupt or hostile pickle -- we never write one like this. */
65446544
PyErr_SetString(st->UnpicklingError,
65456545
"odd number of items for SETITEMS");
65466546
return -1;

Modules/_sre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* 2001-05-14 fl fixes for 1.5.2 compatibility
1616
* 2001-07-01 fl added BIGCHARSET support (from Martin von Loewis)
1717
* 2001-10-18 fl fixed group reset issue (from Matthew Mueller)
18-
* 2001-10-20 fl added split primitive; reenable unicode for 1.6/2.0/2.1
18+
* 2001-10-20 fl added split primitive; re-enable unicode for 1.6/2.0/2.1
1919
* 2001-10-21 fl added sub/subn primitive
2020
* 2001-10-24 fl added finditer primitive (for 2.2 only)
2121
* 2001-12-07 fl fixed memory leak in sub/subn (Guido van Rossum)

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5323,7 +5323,7 @@ encode_locale_ex(PyObject *self, PyObject *args)
53235323
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
53245324
break;
53255325
default:
5326-
PyErr_SetString(PyExc_ValueError, "unknow error code");
5326+
PyErr_SetString(PyExc_ValueError, "unknown error code");
53275327
break;
53285328
}
53295329
return res;
@@ -5366,7 +5366,7 @@ decode_locale_ex(PyObject *self, PyObject *args)
53665366
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
53675367
break;
53685368
default:
5369-
PyErr_SetString(PyExc_ValueError, "unknow error code");
5369+
PyErr_SetString(PyExc_ValueError, "unknown error code");
53705370
break;
53715371
}
53725372
return res;

Modules/_threadmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ where the corresponding signal handler will be executed.\n\
12191219
If *signum* is omitted, SIGINT is assumed.\n\
12201220
A subthread can use this function to interrupt the main thread.\n\
12211221
\n\
1222-
Note: the default signal hander for SIGINT raises ``KeyboardInterrupt``."
1222+
Note: the default signal handler for SIGINT raises ``KeyboardInterrupt``."
12231223
);
12241224

12251225
static lockobject *newlockobject(PyObject *module);

Modules/_tkinter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ PyTclObject_str(PyTclObject *self)
797797
Py_INCREF(self->string);
798798
return self->string;
799799
}
800-
/* XXX Could chache result if it is non-ASCII. */
800+
/* XXX Could cache result if it is non-ASCII. */
801801
return unicodeFromTclObj(self->value);
802802
}
803803

Modules/_tracemalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ tracemalloc_clear_filename(void *value)
833833
static void
834834
tracemalloc_clear_traces(void)
835835
{
836-
/* The GIL protects variables againt concurrent access */
836+
/* The GIL protects variables against concurrent access */
837837
assert(PyGILState_Check());
838838

839839
TABLES_LOCK();

0 commit comments

Comments
 (0)