Xiang Zhang added the comment: Hi, Serhiy. I've tried one version factoring the common parts out. I make them one function but it seems not very elegant. I also think about passing the object and use it to get the type and then determine how to get the string, what the pre/postfix are, and the exception message, but that seems not elegant either. And I don't figure out what the two function's advantage. Let me know your considerations.
BTW, I am still not sure repr could be put into bytes_methods.c. The functions in it are all tp->methods. ---------- Added file: http://bugs.python.org/file43702/_Py_bytes_repr.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27492> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com