Serhiy Storchaka added the comment:

Bytes and bytearray share a much of code. I think it is possible to share the 
implementation of reprs. Just add two functions in bytes_methods.c: one counts 
the size of the repr and determines the quote, and other writes the content of 
the repr in preallocated buffer.

versions:  -Python 3.5

Python tracker <>
Python-bugs-list mailing list

Reply via email to