[3.14] gh-141004: Document PyErr_RangedSyntaxLocationObject (GH-141521) (#141525)

gh-141004: Document `PyErr_RangedSyntaxLocationObject` (GH-141521)

PyErr_RangedSyntaxLocationObject
(cherry picked from commit 196f1519cd)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-11-13 19:05:09 +01:00 committed by GitHub
parent 48b7d75aaf
commit c5e0ce73f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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