]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141004: Document `PyErr_RangedSyntaxLocationObject` (#141521)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Thu, 13 Nov 2025 17:58:47 +0000 (17:58 +0000)
committerGitHub <noreply@github.com>
Thu, 13 Nov 2025 17:58:47 +0000 (17:58 +0000)
PyErr_RangedSyntaxLocationObject

Doc/c-api/exceptions.rst

index 0ee595a07acc7723878c4e8211879e3d91d162b8..d7fe9e2c9ec9b49bdf557655282904cb9da607be 100644 (file)
@@ -309,6 +309,14 @@ For convenience, some of these functions will always return a
    .. versionadded:: 3.4
 
 
+.. c:function:: void PyErr_RangedSyntaxLocationObject(PyObject *filename, int lineno, int col_offset, int end_lineno, int end_col_offset)
+
+   Similar to :c:func:`PyErr_SyntaxLocationObject`, but also sets the
+   *end_lineno* and *end_col_offset* information for the current exception.
+
+   .. versionadded:: 3.10
+
+
 .. c:function:: void PyErr_SyntaxLocationEx(const char *filename, int lineno, int col_offset)
 
    Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string