diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2015-03-11 15:17:00 (GMT) |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2015-03-11 15:17:00 (GMT) |
commit | 62e977f1b6d52a973304db9b0268aece99cb6c42 (patch) | |
tree | 33a3d6ed472d37bb422f325349f6bf3de0e57049 /Objects | |
parent | 6dd20c2d52e079161ce6c8082619fafc734efa14 (diff) | |
download | cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.zip cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.tar.gz cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.tar.bz2 |
Close issue23467: add %r compatibility to bytes and bytearray
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/bytesobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 2ceba48..e0ac1ab 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -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) |