Fix a bug in rendering of \\ by repr() -- it rendered as \\\ instead

of \\.
This commit is contained in:
Guido van Rossum 2001-09-21 15:38:17 +00:00
parent e4874aeab0
commit ad9744a67a
1 changed files with 1 additions and 0 deletions

View File

@ -1758,6 +1758,7 @@ PyObject *unicodeescape_string(const Py_UNICODE *s,
(ch == (Py_UNICODE) PyString_AS_STRING(repr)[1] || ch == '\\')) { (ch == (Py_UNICODE) PyString_AS_STRING(repr)[1] || ch == '\\')) {
*p++ = '\\'; *p++ = '\\';
*p++ = (char) ch; *p++ = (char) ch;
continue;
} }
#ifdef Py_UNICODE_WIDE #ifdef Py_UNICODE_WIDE