https://github.com/python/cpython/commit/20e298bc37a48049244553862cc1918713494a23
commit: 20e298bc37a48049244553862cc1918713494a23
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2026-05-08T16:36:52+05:30
summary:

[3.15] docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506) 
(#149546)

docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506)
(cherry picked from commit 3565d31690d30a189933bce7b27d0bd2c6973f47)

Co-authored-by: Nathan Goldbaum <[email protected]>

files:
M Doc/c-api/dict.rst

diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst
index a2a0d0d80657eb..556113a97bf772 100644
--- a/Doc/c-api/dict.rst
+++ b/Doc/c-api/dict.rst
@@ -151,7 +151,7 @@ Dictionary objects
    * If the key is present, set *\*result* to a new :term:`strong reference`
      to the value and return ``1``.
    * If the key is missing, set *\*result* to ``NULL`` and return ``0``.
-   * On error, raise an exception and return ``-1``.
+   * On error, raise an exception, set *\*result* to ``NULL`` and return 
``-1``.
 
    The first argument can be a :class:`dict` or a :class:`frozendict`.
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to