[Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.42,2.43

M.-A. Lemburg python-dev@python.org
2000年7月11日 02:47:08 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21384/Objects
Modified Files:
	unicodeobject.c 
Log Message:
Jeremy Hylton:
better error message for unicode coercion failure
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.42
retrieving revision 2.43
diff -C2 -r2.42 -r2.43
*** unicodeobject.c	2000年07月10日 18:27:47	2.42
--- unicodeobject.c	2000年07月11日 09:47:04	2.43
***************
*** 407,412 ****
 	 case of a TypeError. */
 	if (PyErr_ExceptionMatches(PyExc_TypeError))
! 	 PyErr_SetString(PyExc_TypeError,
! 		 "coercing to Unicode: need string or buffer");
 	goto onError;
 }
--- 407,414 ----
 	 case of a TypeError. */
 	if (PyErr_ExceptionMatches(PyExc_TypeError))
! 	 PyErr_Format(PyExc_TypeError,
! 			 "coercing to Unicode: need string or buffer, "
! 			 "%.80s found",
! 			 obj->ob_type->tp_name);
 	goto onError;
 }

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