summaryrefslogtreecommitdiff
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-10-09 10:38:36 +0200
committerMartin v. Löwis <martin@v.loewis.de>2011-10-09 10:38:36 +0200
commitdcacb24f386ae1b107462181af42b6826ec15fb7 (patch)
treeed05b3b498c8ef724d116a5c46c3fb20ce395773 /Modules/itertoolsmodule.c
parent08445566b23e60a05193826e327472776644c2b6 (diff)
downloadcpython-dcacb24f386ae1b107462181af42b6826ec15fb7.tar.gz
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r--Modules/itertoolsmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index d0897c3eb9..4f81fe29d2 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -654,7 +654,9 @@ tee(PyObject *self, PyObject *args)
copyable = it;
PyTuple_SET_ITEM(result, 0, copyable);
for (i=1 ; i<n ; i++) {
- copyable = PyObject_CallMethod(copyable, "__copy__", NULL);
+ _Py_identifier(__copy__);
+
+ copyable = _PyObject_CallMethodId(copyable, &PyId___copy__, NULL);
if (copyable == NULL) {
Py_DECREF(result);
return NULL;