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.
diff --git a/Python/compile.c b/Python/compile.c
index ffca830..359de58 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -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: