[issue25270] codecs.escape_encode systemerror on empty byte string

Marc-Andre Lemburg report at bugs.python.org
Thu Oct 1 09:34:36 CEST 2015


Marc-Andre Lemburg added the comment:

On 01.10.2015 04:35, Martin Panter wrote:
> For the record, because I was curious: Function codecs.escape_encode() is not documented, and barely tested. It was used for the documented “string_escape” codec in Python 2, but this codec was removed for Python 3 in revision bc90fc9b70b7. The function was apparently added to support pickling, but I don’t see any evidence that it was ever used. Only the decode counterpart was used. I wonder if the encode function could be removed at some point.

It's a codec, so either we remove both functions or leave both
functions in. It's still used in pickletools and serves a useful
purpose there (to unescape embedded escapes in byte streams).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25270>
_______________________________________


More information about the Python-bugs-list mailing list