[Python-checkins] cpython (3.6): Issue #28544: Fix inefficient call to _PyObject_CallMethodId()

victor.stinner python-checkins at python.org
Sat Oct 29 03:12:35 EDT 2016


https://hg.python.org/cpython/rev/950fbd75223b
changeset:   104786:950fbd75223b
branch:      3.6
parent:      104784:db7bcd92cf85
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Sat Oct 29 09:05:39 2016 +0200
summary:
  Issue #28544: Fix inefficient call to _PyObject_CallMethodId()

"()" format string creates an empty list of argument but requires extra work to
parse the format string.

files:
  Modules/_asynciomodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -152,7 +152,7 @@
     Py_CLEAR(fut->fut_loop);
     fut->fut_loop = loop;
 
-    res = _PyObject_CallMethodId(fut->fut_loop, &PyId_get_debug, "()", NULL);
+    res = _PyObject_CallMethodId(fut->fut_loop, &PyId_get_debug, NULL);
     if (res == NULL) {
         return -1;
     }

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list