Commit 656d84c6 authored by Raymond Hettinger's avatar Raymond Hettinger

CallMethod is faster with a NULL third-argument than with an empty format string.

parent 0fbba372
...@@ -2050,7 +2050,7 @@ builtin_trunc(PyObject *self, PyObject *number) ...@@ -2050,7 +2050,7 @@ builtin_trunc(PyObject *self, PyObject *number)
/* XXX: The py3k branch gets better errors for this by using /* XXX: The py3k branch gets better errors for this by using
_PyType_Lookup(), but since float's mro isn't set in py2.6, _PyType_Lookup(), but since float's mro isn't set in py2.6,
we just use PyObject_CallMethod here. */ we just use PyObject_CallMethod here. */
return PyObject_CallMethod(number, "__trunc__", ""); return PyObject_CallMethod(number, "__trunc__", NULL);
} }
PyDoc_STRVAR(trunc_doc, PyDoc_STRVAR(trunc_doc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment