Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

r76602 - python/trunk/Modules/itertoolsmodule.c

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Nov 30, 2009, 2:20 PM

Post #1 of 1 (206 views)
Permalink
r76602 - python/trunk/Modules/itertoolsmodule.c

Author: raymond.hettinger
Date: Mon Nov 30 22:13:52 2009
New Revision: 76602

Log:
Handle step values other than one.

Modified:
python/trunk/Modules/itertoolsmodule.c

Modified: python/trunk/Modules/itertoolsmodule.c
==============================================================================
--- python/trunk/Modules/itertoolsmodule.c (original)
+++ python/trunk/Modules/itertoolsmodule.c Mon Nov 30 22:13:52 2009
@@ -3379,7 +3379,7 @@
count_reduce(countobject *lz)
{
if (lz->cnt == PY_SSIZE_T_MAX)
- return Py_BuildValue("O(O)", Py_TYPE(lz), lz->long_cnt);
+ return Py_BuildValue("O(OO)", Py_TYPE(lz), lz->long_cnt, lz->long_step);
return Py_BuildValue("O(n)", Py_TYPE(lz), lz->cnt);
}

@@ -3388,6 +3388,7 @@
static PyMethodDef count_methods[] = {
{"__reduce__", (PyCFunction)count_reduce, METH_NOARGS,
count_reduce_doc},
+ {NULL, NULL} /* sentinel */
};

PyDoc_STRVAR(count_doc,
_______________________________________________
Python-checkins mailing list
Python-checkins [at] python
http://mail.python.org/mailman/listinfo/python-checkins

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.