Close issue23467: add %r compatibility to bytes and bytearray

This commit is contained in:
Ethan Furman 2015-03-11 08:17:00 -07:00
parent 6dd20c2d52
commit 62e977f1b6
3 changed files with 14 additions and 1 deletions

View file

@ -720,6 +720,8 @@ _PyBytes_Format(PyObject *format, PyObject *args)
pbuf = "%";
len = 1;
break;
case 'r':
// %r is only for 2/3 code; 3 only code should use %a
case 'a':
temp = PyObject_ASCII(v);
if (temp == NULL)