[Python-checkins] bpo-39585: Delete a pending comment in _warning.c (GH-18414)

Hai Shi webhook-mailer at python.org
Sat Mar 14 09:41:02 EDT 2020


https://github.com/python/cpython/commit/57c781048915e45d15eaa348c51ec01b12cc170a
commit: 57c781048915e45d15eaa348c51ec01b12cc170a
branch: master
author: Hai Shi <shihai1992 at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-03-14T15:40:58+02:00
summary:

bpo-39585: Delete a pending comment in _warning.c (GH-18414)

files:
M Python/_warnings.c

diff --git a/Python/_warnings.c b/Python/_warnings.c
index 39f8033cd906a..834ceb1845946 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -491,8 +491,9 @@ show_warning(PyObject *filename, int lineno, PyObject *text,
     PyOS_snprintf(lineno_str, sizeof(lineno_str), ":%d: ", lineno);
 
     name = _PyObject_GetAttrId(category, &PyId___name__);
-    if (name == NULL)  /* XXX Can an object lack a '__name__' attribute? */
+    if (name == NULL) {
         goto error;
+    }
 
     f_stderr = _PySys_GetObjectId(&PyId_stderr);
     if (f_stderr == NULL) {



More information about the Python-checkins mailing list