Skip to content

Commit 74138ac

Browse files
[3.9] More minor fixes to C API docs (GH-31714) (GH-32260)
* init_config: wording fixes * bytearray: remove XXX, there is a good link to the buffer docs * bytes, call, exceptions: minor wording fixes. (cherry picked from commit 677a879) Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent 62da258 commit 74138ac

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

Doc/c-api/bytearray.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Direct API functions
4242
Return a new bytearray object from any object, *o*, that implements the
4343
:ref:`buffer protocol <bufferobjects>`.
4444
45-
.. XXX expand about the buffer protocol, at least somewhere
46-
4745
4846
.. c:function:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len)
4947

Doc/c-api/bytes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Bytes Objects
66
-------------
77

8-
These functions raise :exc:`TypeError` when expecting a bytes parameter and are
8+
These functions raise :exc:`TypeError` when expecting a bytes parameter and
99
called with a non-bytes parameter.
1010

1111
.. index:: object: bytes

Doc/c-api/call.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This convention is not only used by *tp_call*:
2626
:c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_init`
2727
also pass arguments this way.
2828

29-
To call an object, use :c:func:`PyObject_Call` or other
29+
To call an object, use :c:func:`PyObject_Call` or another
3030
:ref:`call API <capi-call>`.
3131

3232

Doc/c-api/exceptions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ For convenience, some of these functions will always return a
281281
282282
.. c:function:: void PyErr_SyntaxLocation(const char *filename, int lineno)
283283
284-
Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is
284+
Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is
285285
omitted.
286286
287287
@@ -333,7 +333,7 @@ an error value).
333333
334334
Issue a warning message with explicit control over all warning attributes. This
335335
is a straightforward wrapper around the Python function
336-
:func:`warnings.warn_explicit`, see there for more information. The *module*
336+
:func:`warnings.warn_explicit`; see there for more information. The *module*
337337
and *registry* arguments may be set to ``NULL`` to get the default effect
338338
described there.
339339
@@ -441,7 +441,7 @@ Querying the error indicator
441441
error indicator.
442442
443443
444-
.. c:function:: void PyErr_NormalizeException(PyObject**exc, PyObject**val, PyObject**tb)
444+
.. c:function:: void PyErr_NormalizeException(PyObject **exc, PyObject **val, PyObject **tb)
445445
446446
Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` below
447447
can be "unnormalized", meaning that ``*exc`` is a class object but ``*val`` is

Doc/c-api/init_config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ Isolated Configuration
823823
isolate Python from the system. For example, to embed Python into an
824824
application.
825825
826-
This configuration ignores global configuration variables, environments
826+
This configuration ignores global configuration variables, environment
827827
variables, command line arguments (:c:member:`PyConfig.argv` is not parsed)
828828
and user site directory. The C standard streams (ex: ``stdout``) and the
829829
LC_CTYPE locale are left unchanged. Signal handlers are not installed.
@@ -1000,7 +1000,7 @@ Multi-Phase Initialization Private Provisional API
10001000
--------------------------------------------------
10011001
10021002
This section is a private provisional API introducing multi-phase
1003-
initialization, the core feature of the :pep:`432`:
1003+
initialization, the core feature of :pep:`432`:
10041004
10051005
* "Core" initialization phase, "bare minimum Python":
10061006

0 commit comments

Comments
 (0)