File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1461,10 +1461,26 @@ to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode`
14611461| uu_codec | uu | Convert the operand using | |
14621462| | | uuencode. | |
14631463+----------------------+------------------+------------------------------+------------------------------+
1464+ | escape_codec | escape | Encode and decode byte | :func: `codecs.escape_encode ` |
1465+ | | | sequences using escape | / |
1466+ | | | sequences, similar to | :func: `codecs.escape_decode ` |
1467+ | | | :func: `repr ` of bytes. | |
1468+ +----------------------+------------------+------------------------------+------------------------------+
14641469| zlib_codec | zip, zlib | Compress the operand using | :meth: `zlib.compress ` / |
14651470| | | gzip. | :meth: `zlib.decompress ` |
14661471+----------------------+------------------+------------------------------+------------------------------+
14671472
1473+ .. function :: codecs.escape_encode(input, errors='strict')
1474+
1475+ Encode *input * using escape sequences. Similar to how :func: `repr ` on bytes
1476+ produces escaped byte values. Returns a tuple of the encoded bytes and
1477+ the length consumed.
1478+
1479+ .. function :: codecs.escape_decode(input, errors='strict')
1480+
1481+ Decode *input * from escape sequences back to the original bytes.
1482+ Returns a tuple of the decoded bytes and the length consumed.
1483+
14681484.. [#b64 ] In addition to :term: `bytes-like objects <bytes-like object> `,
14691485 ``'base64_codec' `` also accepts ASCII-only instances of :class: `str ` for
14701486 decoding
You can’t perform that action at this time.
0 commit comments