summaryrefslogtreecommitdiff
path: root/Doc/library/codecs.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium>2015-09-12 00:34:28 +0000
committerMartin Panter <vadmium>2015-09-12 00:34:28 +0000
commit8c2ad299f275fac244f13e472ef0c6ca7eb0ea44 (patch)
tree7aea11012bdefcf25c75e33e493a8b10b2aed462 /Doc/library/codecs.rst
parenta094191febab7931881c41e622fd43e22c5a2b9c (diff)
downloadcpython-8c2ad299f275fac244f13e472ef0c6ca7eb0ea44.tar.gz
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/codecs.rst')
-rw-r--r--Doc/library/codecs.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 9496035cd7..f3017da2c8 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -1284,9 +1284,9 @@ to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode`
+----------------------+------------------+------------------------------+------------------------------+
| Codec | Aliases | Purpose | Encoder / decoder |
+======================+==================+==============================+==============================+
-| base64_codec [#b64]_ | base64, base_64 | Convert operand to MIME | :meth:`base64.b64encode` / |
-| | | base64 (the result always | :meth:`base64.b64decode` |
-| | | includes a trailing | |
+| base64_codec [#b64]_ | base64, base_64 | Convert operand to multiline | :meth:`base64.encodebytes` / |
+| | | MIME base64 (the result | :meth:`base64.decodebytes` |
+| | | always includes a trailing | |
| | | ``'\n'``) | |
| | | | |
| | | .. versionchanged:: 3.4 | |
@@ -1298,14 +1298,14 @@ to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode`
| 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, | Convert operand to MIME | :meth:`quopri.encodestring` /|
-| | quotedprintable, | quoted printable | :meth:`quopri.decodestring` |
-| | quoted_printable | | |
+| quopri_codec | quopri, | Convert operand to MIME | :meth:`quopri.encode` with |
+| | quotedprintable, | quoted printable | ``quotetabs=True`` / |
+| | quoted_printable | | :meth:`quopri.decode` |
+----------------------+------------------+------------------------------+------------------------------+
| uu_codec | uu | Convert the operand using | :meth:`uu.encode` / |
| | | uuencode | :meth:`uu.decode` |