[Python-checkins] Fix comment about PyObject_IsTrue. (GH-22343)

Stefan Pochmann webhook-mailer at python.org
Wed Oct 7 10:13:13 EDT 2020


https://github.com/python/cpython/commit/f90dc36c15d7fee0efaf6d39e97be0bdf2683e93
commit: f90dc36c15d7fee0efaf6d39e97be0bdf2683e93
branch: master
author: Stefan Pochmann <609905+pochmann at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-10-07T09:12:52-05:00
summary:

Fix comment about PyObject_IsTrue. (GH-22343)

The `for` statement doesn't use a condition and this function, the `while` statement does.

files:
M Objects/object.c

diff --git a/Objects/object.c b/Objects/object.c
index fe3734404f5cf..9889503cfd893 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1387,7 +1387,7 @@ PyObject_GenericSetDict(PyObject *obj, PyObject *value, void *context)
 }
 
 
-/* Test a value used as condition, e.g., in a for or if statement.
+/* Test a value used as condition, e.g., in a while or if statement.
    Return -1 if an error occurred */
 
 int



More information about the Python-checkins mailing list