From: Fredrik Lundh Date: Sat, 8 Jul 2000 17:43:32 +0000 (+0000) Subject: - changed __repr__ to use "unicode escape" encoding for unicode X-Git-Tag: v2.0b1~995 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a1e060619b10062ce7ef2b826b2da940096f7a5;p=python - changed __repr__ to use "unicode escape" encoding for unicode strings, instead of the default encoding. (see "minidom" thread for discussion, and also patch #100706) --- diff --git a/Objects/object.c b/Objects/object.c index a04e00bf79..9c4cd6a05a 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -267,7 +267,7 @@ PyObject_Repr(v) return NULL; if (PyUnicode_Check(res)) { PyObject* str; - str = PyUnicode_AsEncodedString(res, NULL, NULL); + str = PyUnicode_AsUnicodeEscapeString(res); Py_DECREF(res); if (str) res = str;