Skip to content

Commit 25a2a60

Browse files
hugovkencukou
andauthored
[3.14] Fix minor typos and wording in C API docs (GH-140955) (#140966)
Co-authored-by: Petr Viktorin <[email protected]>
1 parent 09c890e commit 25a2a60

File tree

12 files changed

+13
-13
lines changed

12 files changed

+13
-13
lines changed

Doc/c-api/cell.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Cell Objects
77

88
"Cell" objects are used to implement variables referenced by multiple scopes.
99
For each such variable, a cell object is created to store the value; the local
10-
variables of each stack frame that references the value contains a reference to
10+
variables of each stack frame that references the value contain a reference to
1111
the cells from outer scopes which also use that variable. When the value is
1212
accessed, the value contained in the cell is used instead of the cell object
1313
itself. This de-referencing of the cell object requires support from the

Doc/c-api/datetime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ macros.
4646

4747
.. c:var:: PyTypeObject PyDateTime_DeltaType
4848
49-
This instance of :c:type:`PyTypeObject` represents Python type for
49+
This instance of :c:type:`PyTypeObject` represents the Python type for
5050
the difference between two datetime values;
5151
it is the same object as :class:`datetime.timedelta` in the Python layer.
5252

Doc/c-api/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ found in the dictionary of type objects.
3232
3333
.. c:function:: int PyDescr_IsData(PyObject *descr)
3434
35-
Return non-zero if the descriptor objects *descr* describes a data attribute, or
35+
Return non-zero if the descriptor object *descr* describes a data attribute, or
3636
``0`` if it describes a method. *descr* must be a descriptor object; there is
3737
no error checking.
3838

Doc/c-api/init_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Error Handling
102102
* Set *\*err_msg* and return ``1`` if an error is set.
103103
* Set *\*err_msg* to ``NULL`` and return ``0`` otherwise.
104104
105-
An error message is an UTF-8 encoded string.
105+
An error message is a UTF-8 encoded string.
106106
107107
If *config* has an exit code, format the exit code as an error
108108
message.

Doc/c-api/mapping.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
102102
103103
.. note::
104104
105-
Exceptions which occur when this calls :meth:`~object.__getitem__`
105+
Exceptions which occur when this calls the :meth:`~object.__getitem__`
106106
method are silently ignored.
107107
For proper error handling, use :c:func:`PyMapping_HasKeyWithError`,
108108
:c:func:`PyMapping_GetOptionalItem` or :c:func:`PyObject_GetItem()` instead.
@@ -116,7 +116,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
116116
117117
.. note::
118118
119-
Exceptions that occur when this calls :meth:`~object.__getitem__`
119+
Exceptions that occur when this calls the :meth:`~object.__getitem__`
120120
method or while creating the temporary :class:`str`
121121
object are silently ignored.
122122
For proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`,

Doc/c-api/marshal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The following functions allow marshalled values to be read back in.
8282
assumes that no further objects will be read from the file, allowing it to
8383
aggressively load file data into memory so that the de-serialization can
8484
operate from data in memory rather than reading a byte at a time from the
85-
file. Only use these variant if you are certain that you won't be reading
85+
file. Only use this variant if you are certain that you won't be reading
8686
anything else from the file.
8787
8888
On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError`

Doc/c-api/memory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ All allocating functions belong to one of three different "domains" (see also
102102
strategies and are optimized for different purposes. The specific details on
103103
how every domain allocates memory or what internal functions each domain calls
104104
is considered an implementation detail, but for debugging purposes a simplified
105-
table can be found at :ref:`here <default-memory-allocators>`.
105+
table can be found at :ref:`default-memory-allocators`.
106106
The APIs used to allocate and free a block of memory must be from the same domain.
107107
For example, :c:func:`PyMem_Free` must be used to free memory allocated using :c:func:`PyMem_Malloc`.
108108

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Module Objects
103103
created, or ``NULL`` if the module wasn't created from a definition.
104104
105105
On error, return ``NULL`` with an exception set.
106-
Use :c:func:`PyErr_Occurred` to tell this case apart from a mising
106+
Use :c:func:`PyErr_Occurred` to tell this case apart from a missing
107107
:c:type:`!PyModuleDef`.
108108
109109

Doc/c-api/monitoring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Managing the Monitoring State
136136
-----------------------------
137137
138138
Monitoring states can be managed with the help of monitoring scopes. A scope
139-
would typically correspond to a python function.
139+
would typically correspond to a Python function.
140140
141141
.. c:function:: int PyMonitoring_EnterScope(PyMonitoringState *state_array, uint64_t *version, const uint8_t *event_types, Py_ssize_t length)
142142

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Object Protocol
7373
7474
Flag to be used with multiple functions that print the object (like
7575
:c:func:`PyObject_Print` and :c:func:`PyFile_WriteObject`).
76-
If passed, these function would use the :func:`str` of the object
76+
If passed, these functions use the :func:`str` of the object
7777
instead of the :func:`repr`.
7878
7979

0 commit comments

Comments
 (0)