mirror of
https://github.com/python/cpython.git
synced 2025-11-28 22:18:54 +00:00
- changed __repr__ to use "unicode escape" encoding for unicode
strings, instead of the default encoding. (see "minidom" thread for discussion, and also patch #100706)
This commit is contained in:
parent
d5c84ede06
commit
2a1e060619
1 changed files with 1 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ PyObject_Repr(v)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (PyUnicode_Check(res)) {
|
if (PyUnicode_Check(res)) {
|
||||||
PyObject* str;
|
PyObject* str;
|
||||||
str = PyUnicode_AsEncodedString(res, NULL, NULL);
|
str = PyUnicode_AsUnicodeEscapeString(res);
|
||||||
Py_DECREF(res);
|
Py_DECREF(res);
|
||||||
if (str)
|
if (str)
|
||||||
res = str;
|
res = str;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue