Skip to content

Commit 8b3ad7b

Browse files
author
raymond.hettinger
committed
CallMethod is faster with a NULL third-argument than with an empty format string.
git-svn-id: http://svn.python.org/projects/python/trunk@60425 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent c053228 commit 8b3ad7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/bltinmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,7 @@ builtin_trunc(PyObject *self, PyObject *number)
20502050
/* XXX: The py3k branch gets better errors for this by using
20512051
_PyType_Lookup(), but since float's mro isn't set in py2.6,
20522052
we just use PyObject_CallMethod here. */
2053-
return PyObject_CallMethod(number, "__trunc__", "");
2053+
return PyObject_CallMethod(number, "__trunc__", NULL);
20542054
}
20552055

20562056
PyDoc_STRVAR(trunc_doc,

0 commit comments

Comments
 (0)