• Walter Dörwald's avatar
    Change PyUnicode_EncodeUnicodeEscape() to return a bytes object. · 79e913ea
    Walter Dörwald authored
    However PyUnicode_AsUnicodeEscapeString() (which is used by
    Objects/fileobject.c::file_repr()) still returns a str8 object.
    Give unicode_repr() it's own implementation which returns a str8
    object (it was formerly just calling unicodeescape_string()
    which was used to implement PyUnicode_EncodeUnicodeEscape() too),
    because once repr() is required to return unicode objects it
    needs its own implementation anyway.
    79e913ea
unicodeobject.c 219 KB