[Python-checkins] python/dist/src/Modules itertoolsmodule.c, 1.18.6.3, 1.18.6.4 (original) (raw)
rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sat May 8 15:52:42 EDT 2004
- Previous message: [Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.29, 1.30
- Next message: [Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.15.6.4, 1.15.6.5
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3285/Modules
Modified Files: Tag: release23-maint itertoolsmodule.c Log Message: SF #950057: itertools.chain doesn't "process" exceptions as they occur
Both cycle() and chain() were handling exceptions only when switching input sources. The patch makes the handle more immediate.
Index: itertoolsmodule.c
RCS file: /cvsroot/python/python/dist/src/Modules/itertoolsmodule.c,v retrieving revision 1.18.6.3 retrieving revision 1.18.6.4 diff -C2 -d -r1.18.6.3 -r1.18.6.4 *** itertoolsmodule.c 30 Aug 2003 22:14:46 -0000 1.18.6.3 --- itertoolsmodule.c 8 May 2004 19:52:39 -0000 1.18.6.4
*** 95,98 **** --- 95,104 ---- return item; }
if (PyErr_Occurred()) {
if (PyErr_ExceptionMatches(PyExc_StopIteration))
PyErr_Clear();
else
return NULL;
} if (PyList_Size(lz->saved) == 0) return NULL;
*** 1050,1053 **** --- 1056,1065 ---- if (item != NULL) return item;
if (PyErr_Occurred()) {
if (PyErr_ExceptionMatches(PyExc_StopIteration))
PyErr_Clear();
else
return NULL;
} lz->iternum++; }
- Previous message: [Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.29, 1.30
- Next message: [Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.15.6.4, 1.15.6.5
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]