diff Python/compile.c @ 41878:089f449a20cd

Change PyErr_Format() to generate a unicode string (by using PyUnicode_FromFormatV() instead of PyString_FromFormatV()). Change calls to PyErr_Format() to benefit from the new format specifiers: Using %S, object instead of %s, PyString_AS_STRING(object) with will work with unicode objects too.
author Walter Dörwald <walter@livinglogic.de>
date Fri, 25 May 2007 15:46:59 +0000
parents 24b60622b944
children cd125fe83051
line wrap: on
line diff
--- a/Python/compile.c	Fri May 25 14:14:31 2007 +0000
+++ b/Python/compile.c	Fri May 25 15:46:59 2007 +0000
@@ -2467,9 +2467,9 @@
 			break;
 		case Del:
 			PyErr_Format(PyExc_SyntaxError,
-				     "can not delete variable '%s' referenced "
+				     "can not delete variable '%S' referenced "
 				     "in nested scope",
-				     PyString_AS_STRING(name));
+				     name);
 			Py_DECREF(mangled);
 			return 0;
 		case Param: