From 651e5e619d600c83391c7281fc087aad751a5fe3 Mon Sep 17 00:00:00 2001 From: manoj Date: Mon, 25 May 2026 19:38:53 +0530 Subject: [PATCH 1/2] Fix docs in PyThreadState_GetDict() from threads.rst --- Doc/c-api/threads.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/c-api/threads.rst b/Doc/c-api/threads.rst index 508a4d71ecdf961..ba57b7eb0880b0b 100644 --- a/Doc/c-api/threads.rst +++ b/Doc/c-api/threads.rst @@ -736,10 +736,10 @@ Low-level APIs .. c:function:: PyObject* PyThreadState_GetDict() Return a dictionary in which extensions can store thread-specific state - information. Each extension should use a unique key to use to store state in + information. Each extension should use a unique key to use and store a state in the dictionary. It is okay to call this function when no :term:`thread state` is :term:`attached `. If this function returns - ``NULL``, no exception has been raised and the caller should assume no + ``NULL`` and no exception has been raised, then the caller should assume no thread state is attached. From b5e6fa24321102599cbc2edb5642ce37f8fba202 Mon Sep 17 00:00:00 2001 From: manoj Date: Mon, 25 May 2026 19:43:39 +0530 Subject: [PATCH 2/2] Fix docs in PyThreadState_GetDict() from threads.rst --- Doc/c-api/threads.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/threads.rst b/Doc/c-api/threads.rst index ba57b7eb0880b0b..ca34abd73d8423b 100644 --- a/Doc/c-api/threads.rst +++ b/Doc/c-api/threads.rst @@ -736,7 +736,7 @@ Low-level APIs .. c:function:: PyObject* PyThreadState_GetDict() Return a dictionary in which extensions can store thread-specific state - information. Each extension should use a unique key to use and store a state in + information. Each extension should use a unique key to store a state in the dictionary. It is okay to call this function when no :term:`thread state` is :term:`attached `. If this function returns ``NULL`` and no exception has been raised, then the caller should assume no