diff options
author | Martin Panter <vadmium> | 2015-09-12 00:34:28 (GMT) |
---|---|---|
committer | Martin Panter <vadmium> | 2015-09-12 00:34:28 (GMT) |
commit | b2528c92f139195e8a3c745833ad1cd0ff4bc0f2 (patch) | |
tree | 723d38fa103b68f085c0453693fd489a406578b5 /Doc/library | |
parent | 90bc71f5b18abc0bb232f8ff8f56683b4420c3e0 (diff) | |
download | cpython-b2528c92f139195e8a3c745833ad1cd0ff4bc0f2.zip cpython-b2528c92f139195e8a3c745833ad1cd0ff4bc0f2.tar.gz cpython-b2528c92f139195e8a3c745833ad1cd0ff4bc0f2.tar.bz2 |
Issue #16473: Fix byte transform codec documentation; test quotetabs=True
This changes the equivalent functions listed for the Base-64, hex and Quoted-
Printable codecs to reflect the functions actually used. Also mention and
test the "quotetabs" setting for Quoted-Printable encoding.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/codecs.rst | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index 9529e66..f5d1a9d 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -1193,21 +1193,22 @@ The following codecs provide str-to-str encoding and decoding +--------------------+---------------------------+---------------------------+------------------------------+ | Codec | Aliases | Purpose | Encoder/decoder | +====================+===========================+===========================+==============================+ -| base64_codec | base64, base-64 | Convert operand to MIME | :meth:`base64.b64encode`, | -| | | base64 (the result always | :meth:`base64.b64decode` | -| | | includes a trailing | | -| | | ``'\n'``) | | +| base64_codec | base64, base-64 | Convert operand to | :meth:`base64.encodestring`, | +| | | multiline MIME base64 (the| :meth:`base64.decodestring` | +| | | result always includes a | | +| | | trailing ``'\n'``) | | +--------------------+---------------------------+---------------------------+------------------------------+ | bz2_codec | bz2 | Compress the operand | :meth:`bz2.compress`, | | | | using bz2 | :meth:`bz2.decompress` | +--------------------+---------------------------+---------------------------+------------------------------+ -| hex_codec | hex | Convert operand to | :meth:`base64.b16encode`, | -| | | hexadecimal | :meth:`base64.b16decode` | +| hex_codec | hex | Convert operand to | :meth:`binascii.b2a_hex`, | +| | | hexadecimal | :meth:`binascii.a2b_hex` | | | | representation, with two | | | | | digits per byte | | +--------------------+---------------------------+---------------------------+------------------------------+ -| quopri_codec | quopri, quoted-printable, | Convert operand to MIME | :meth:`quopri.encodestring`, | -| | quotedprintable | quoted printable | :meth:`quopri.decodestring` | +| quopri_codec | quopri, quoted-printable, | Convert operand to MIME | :meth:`quopri.encode` with | +| | quotedprintable | quoted printable | ``quotetabs=True``, | +| | | | :meth:`quopri.decode` | +--------------------+---------------------------+---------------------------+------------------------------+ | string_escape | | Produce a string that is | | | | | suitable as string | | |