summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-11 13:29:33 (GMT)
committerGitHub <noreply@github.com>2020-02-11 13:29:33 (GMT)
commitf3e7ea5b8c220cd63101e419d529c8563f9c6115 (patch)
tree8df6f5eac4ef584b0a511e070e41848cf678a7f2 /Doc/c-api
parent1ea45ae257971ee7b648e3b031603a31fc059f81 (diff)
downloadcpython-f3e7ea5b8c220cd63101e419d529c8563f9c6115.zip
cpython-f3e7ea5b8c220cd63101e419d529c8563f9c6115.tar.gz
cpython-f3e7ea5b8c220cd63101e419d529c8563f9c6115.tar.bz2
bpo-39500: Document PyUnicode_IsIdentifier() function (GH-18397)
PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the string is not ready.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/unicode.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 96d77c4..b1787ed 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -240,6 +240,16 @@ access internal read-only data of Unicode objects:
:c:func:`PyUnicode_nBYTE_DATA` family of macros.
+.. c:function:: int PyUnicode_IsIdentifier(PyObject *o)
+
+ Return ``1`` if the string is a valid identifier according to the language
+ definition, section :ref:`identifiers`. Return ``0`` otherwise.
+
+ .. versionchanged:: 3.9
+ The function does not call :c:func:`Py_FatalError` anymore if the string
+ is not ready.
+
+
Unicode Character Properties
""""""""""""""""""""""""""""