diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-12-08 23:33:39 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-12-08 23:33:39 (GMT) |
commit | 4c38154a432885a933b539c2682e66caaf440117 (patch) | |
tree | 84f6d0fbe46ac26057383ea0606754f7d28eec0c /Modules/_datetimemodule.c | |
parent | ef7def94c7c681a10031e88efd6511f5c4ff2c75 (diff) | |
download | cpython-4c38154a432885a933b539c2682e66caaf440117.zip cpython-4c38154a432885a933b539c2682e66caaf440117.tar.gz cpython-4c38154a432885a933b539c2682e66caaf440117.tar.bz2 |
Don't parenthesis in _PyObject_CallMethodId() format
Issue #28915: Without parenthesis, _PyObject_CallMethodId() avoids the creation
a temporary tuple, and so is more efficient.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index c14aa4f..0999218 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -4673,7 +4673,7 @@ datetime_repr(PyDateTime_DateTime *self) static PyObject * datetime_str(PyDateTime_DateTime *self) { - return _PyObject_CallMethodId((PyObject *)self, &PyId_isoformat, "(s)", " "); + return _PyObject_CallMethodId((PyObject *)self, &PyId_isoformat, "s", " "); } static PyObject * |