From: Raymond Hettinger Date: Tue, 29 Jan 2008 19:52:09 +0000 (+0000) Subject: CallMethod is faster with a NULL third-argument than with an empty format string. X-Git-Tag: v2.6a1~344 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=867558afd69675be8263a19c3d23b92812a0a62a;p=python CallMethod is faster with a NULL third-argument than with an empty format string. --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 444fc1e718..cd74758eea 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2050,7 +2050,7 @@ builtin_trunc(PyObject *self, PyObject *number) /* XXX: The py3k branch gets better errors for this by using _PyType_Lookup(), but since float's mro isn't set in py2.6, we just use PyObject_CallMethod here. */ - return PyObject_CallMethod(number, "__trunc__", ""); + return PyObject_CallMethod(number, "__trunc__", NULL); } PyDoc_STRVAR(trunc_doc,