summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2022-04-02 23:00:13 (GMT)
committerGitHub <noreply@github.com>2022-04-02 23:00:13 (GMT)
commit74138ac954f6ee04aefcfbb96240a5185bd944c9 (patch)
treea84e68517e8a3f75265e930ae7329188ffbd7be8
parent62da258a455974014ddc3a40466724bb815f862d (diff)
downloadcpython-74138ac954f6ee04aefcfbb96240a5185bd944c9.zip
cpython-74138ac954f6ee04aefcfbb96240a5185bd944c9.tar.gz
cpython-74138ac954f6ee04aefcfbb96240a5185bd944c9.tar.bz2
[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 677a87946630c5fbd9998969669b4dd4f4b32545) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
-rw-r--r--Doc/c-api/bytearray.rst2
-rw-r--r--Doc/c-api/bytes.rst2
-rw-r--r--Doc/c-api/call.rst2
-rw-r--r--Doc/c-api/exceptions.rst6
-rw-r--r--Doc/c-api/init_config.rst4
5 files changed, 7 insertions, 9 deletions
diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst
index 30bcfc7..85a7d13 100644
--- a/Doc/c-api/bytearray.rst
+++ b/Doc/c-api/bytearray.rst
@@ -42,8 +42,6 @@ Direct API functions
Return a new bytearray object from any object, *o*, that implements the
:ref:`buffer protocol <bufferobjects>`.
- .. XXX expand about the buffer protocol, at least somewhere
-
.. c:function:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len)
diff --git a/Doc/c-api/bytes.rst b/Doc/c-api/bytes.rst
index de65701..32c7b80 100644
--- a/Doc/c-api/bytes.rst
+++ b/Doc/c-api/bytes.rst
@@ -5,7 +5,7 @@
Bytes Objects
-------------
-These functions raise :exc:`TypeError` when expecting a bytes parameter and are
+These functions raise :exc:`TypeError` when expecting a bytes parameter and
called with a non-bytes parameter.
.. index:: object: bytes
diff --git a/Doc/c-api/call.rst b/Doc/c-api/call.rst
index 739b5e9..cdf72bc 100644
--- a/Doc/c-api/call.rst
+++ b/Doc/c-api/call.rst
@@ -26,7 +26,7 @@ This convention is not only used by *tp_call*:
:c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_init`
also pass arguments this way.
-To call an object, use :c:func:`PyObject_Call` or other
+To call an object, use :c:func:`PyObject_Call` or another
:ref:`call API <capi-call>`.
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index df38ba4..646dc5a 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -281,7 +281,7 @@ For convenience, some of these functions will always return a
.. c:function:: void PyErr_SyntaxLocation(const char *filename, int lineno)
- Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is
+ Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is
omitted.
@@ -333,7 +333,7 @@ an error value).
Issue a warning message with explicit control over all warning attributes. This
is a straightforward wrapper around the Python function
- :func:`warnings.warn_explicit`, see there for more information. The *module*
+ :func:`warnings.warn_explicit`; see there for more information. The *module*
and *registry* arguments may be set to ``NULL`` to get the default effect
described there.
@@ -441,7 +441,7 @@ Querying the error indicator
error indicator.
-.. c:function:: void PyErr_NormalizeException(PyObject**exc, PyObject**val, PyObject**tb)
+.. c:function:: void PyErr_NormalizeException(PyObject **exc, PyObject **val, PyObject **tb)
Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` below
can be "unnormalized", meaning that ``*exc`` is a class object but ``*val`` is
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst
index 23009e4..f44c7bb 100644
--- a/Doc/c-api/init_config.rst
+++ b/Doc/c-api/init_config.rst
@@ -823,7 +823,7 @@ Isolated Configuration
isolate Python from the system. For example, to embed Python into an
application.
-This configuration ignores global configuration variables, environments
+This configuration ignores global configuration variables, environment
variables, command line arguments (:c:member:`PyConfig.argv` is not parsed)
and user site directory. The C standard streams (ex: ``stdout``) and the
LC_CTYPE locale are left unchanged. Signal handlers are not installed.
@@ -1000,7 +1000,7 @@ Multi-Phase Initialization Private Provisional API
--------------------------------------------------
This section is a private provisional API introducing multi-phase
-initialization, the core feature of the :pep:`432`:
+initialization, the core feature of :pep:`432`:
* "Core" initialization phase, "bare minimum Python":