summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2016-08-31 01:17:25 (GMT)
committerR David Murray <rdmurray@bitdance.com>2016-08-31 01:17:25 (GMT)
commit89b1162511dd62e285c1911013f07b45af07f70a (patch)
tree08bd39400c1930eb873b2acf0ffee2e8b041e190
parentda0288725f3219095aee3e0be56687b6494ffb68 (diff)
parent74eda76085036d836041e616332ef3257d0172d3 (diff)
downloadcpython-89b1162511dd62e285c1911013f07b45af07f70a.zip
cpython-89b1162511dd62e285c1911013f07b45af07f70a.tar.gz
cpython-89b1162511dd62e285c1911013f07b45af07f70a.tar.bz2
Merge #27893: arg name and bytes references in email.parser docs.
-rw-r--r--Doc/library/email.parser.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst
index 71b339a..b8eb7c5 100644
--- a/Doc/library/email.parser.rst
+++ b/Doc/library/email.parser.rst
@@ -202,12 +202,12 @@ have the same API as the :class:`Parser` and :class:`BytesParser` classes.
reading the headers or not. The default is ``False``, meaning it parses
the entire contents of the file.
- .. method:: parsebytes(bytes, headersonly=False)
+ .. method:: parsebytes(text, headersonly=False)
- Similar to the :meth:`parse` method, except it takes a byte string object
- instead of a file-like object. Calling this method on a byte string is
- exactly equivalent to wrapping *text* in a :class:`~io.BytesIO` instance
- first and calling :meth:`parse`.
+ Similar to the :meth:`parse` method, except it takes a :term:`bytes-like
+ object` instead of a file-like object. Calling this method is equivalent
+ to wrapping *text* in a :class:`~io.BytesIO` instance first and calling
+ :meth:`parse`.
Optional *headersonly* is as with the :meth:`parse` method.
@@ -233,7 +233,7 @@ in the top-level :mod:`email` package namespace.
.. function:: message_from_bytes(s, _class=email.message.Message, *, \
policy=policy.compat32)
- Return a message object structure from a byte string. This is exactly
+ Return a message object structure from a :term:`bytes-like object`. This is exactly
equivalent to ``BytesParser().parsebytes(s)``. Optional *_class* and
*strict* are interpreted as with the :class:`~email.parser.Parser` class
constructor.