mirror of
https://github.com/python/cpython.git
synced 2025-09-06 08:51:39 +00:00
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.
This commit is contained in:
parent
e65c86cca0
commit
573c08c1b7
5 changed files with 33 additions and 45 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue