From 573c08c1b73048876b62d99ff8d82337dc8ce0a2 Mon Sep 17 00:00:00 2001 From: Walter Dörwald Date: Fri, 25 May 2007 15:46:59 +0000 Subject: 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. --- Python/compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index ffca8307e52..359de587c59 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2467,9 +2467,9 @@ mangled = _Py_Mangle(c->u->u_private, name); 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: -- cgit v1.2.3