[Python-checkins] python/dist/src/Objects stringobject.c, 2.234, 2.235 unicodeobject.c, 2.234, 2.235

mwh@users.sourceforge.net mwh at users.sourceforge.net
Fri Oct 21 13:45:04 CEST 2005


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12867/Objects
Modified Files:
	stringobject.c unicodeobject.c 
Log Message:
Fix bug:
[ 1327110 ] wrong TypeError traceback in generator expressions
by removing the code that can stomp on the users' TypeError raised by the 
iterable argument to ''.join() -- PySequence_Fast (now?) gives a perfectly
reasonable message itself. Also, a couple of tests.
Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.234
retrieving revision 2.235
diff -u -d -r2.234 -r2.235
--- stringobject.c	20 Oct 2005 04:15:52 -0000	2.234
+++ stringobject.c	21 Oct 2005 11:45:00 -0000	2.235
@@ -1620,10 +1620,6 @@
 
 	seq = PySequence_Fast(orig, "");
 	if (seq == NULL) {
-		if (PyErr_ExceptionMatches(PyExc_TypeError))
-			PyErr_Format(PyExc_TypeError,
-				 "sequence expected, %.80s found",
-				 orig->ob_type->tp_name);
 		return NULL;
 	}
 
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.234
retrieving revision 2.235
diff -u -d -r2.234 -r2.235
--- unicodeobject.c	19 Oct 2005 22:39:02 -0000	2.234
+++ unicodeobject.c	21 Oct 2005 11:45:00 -0000	2.235
@@ -4148,10 +4148,6 @@
 
 fseq = PySequence_Fast(seq, "");
 if (fseq == NULL) {
-	if (PyErr_ExceptionMatches(PyExc_TypeError))
-	 PyErr_Format(PyExc_TypeError,
-			 "sequence expected, %.80s found",
-			 seq->ob_type->tp_name);
 	return NULL;
 }
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /