Skip to content

Commit 5830a28

Browse files
More minor fixes to C API docs (GH-31714)
* 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 16a809f commit 5830a28

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ There are two kinds of configuration:
1616

1717
* The :ref:`Python Configuration <init-python-config>` can be used to build a
1818
customized Python which behaves as the regular Python. For example,
19-
environments variables and command line arguments are used to configure
19+
environment variables and command line arguments are used to configure
2020
Python.
2121

2222
* The :ref:`Isolated Configuration <init-isolated-conf>` can be used to embed
2323
Python into an application. It isolates Python from the system. For example,
24-
environments variables are ignored, the LC_CTYPE locale is left unchanged and
24+
environment variables are ignored, the LC_CTYPE locale is left unchanged and
2525
no signal handler is registered.
2626

2727
The :c:func:`Py_RunMain` function can be used to write a customized Python
@@ -1287,7 +1287,7 @@ Isolated Configuration
12871287
isolate Python from the system. For example, to embed Python into an
12881288
application.
12891289
1290-
This configuration ignores global configuration variables, environments
1290+
This configuration ignores global configuration variables, environment
12911291
variables, command line arguments (:c:member:`PyConfig.argv` is not parsed)
12921292
and user site directory. The C standard streams (ex: ``stdout``) and the
12931293
LC_CTYPE locale are left unchanged. Signal handlers are not installed.
@@ -1432,7 +1432,7 @@ Multi-Phase Initialization Private Provisional API
14321432
==================================================
14331433
14341434
This section is a private provisional API introducing multi-phase
1435-
initialization, the core feature of the :pep:`432`:
1435+
initialization, the core feature of :pep:`432`:
14361436
14371437
* "Core" initialization phase, "bare minimum Python":
14381438

0 commit comments

Comments
 (0)