Fixed bug #1459029 - unicode reprs were double-escaped.

Backed out an old patch from 2000.
This commit is contained in:
Anthony Baxter 2006-03-30 10:53:17 +00:00
parent 80a5d01790
commit 262c00a21e
2 changed files with 3 additions and 1 deletions

View File

@ -12,6 +12,8 @@ What's New in Python 2.5 alpha 1?
Core and builtins
-----------------
- Fixed bug #1459029 - unicode reprs were double-escaped.
- Patch #1396919: The system scope threads are reenabled on FreeBSD
5.4 and later versions.

View File

@ -316,7 +316,7 @@ PyObject_Repr(PyObject *v)
#ifdef Py_USING_UNICODE
if (PyUnicode_Check(res)) {
PyObject* str;
str = PyUnicode_AsUnicodeEscapeString(res);
str = PyUnicode_AsEncodedString(res, NULL, NULL);
Py_DECREF(res);
if (str)
res = str;