diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-19 06:59:18 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-19 06:59:18 (GMT) |
commit | e0f0cf406757cea35db0aeaad592c2418d521b45 (patch) | |
tree | f2b28faff6f7e583abc5251ddb19aa1c05da280e /Doc/library/email.errors.rst | |
parent | ca64d25dd285a784186bc16b3ee39ff8680cabdf (diff) | |
download | cpython-e0f0cf406757cea35db0aeaad592c2418d521b45.zip cpython-e0f0cf406757cea35db0aeaad592c2418d521b45.tar.gz cpython-e0f0cf406757cea35db0aeaad592c2418d521b45.tar.bz2 |
Issue #18761: Improved cross-references in email documentation.
Diffstat (limited to 'Doc/library/email.errors.rst')
-rw-r--r-- | Doc/library/email.errors.rst | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/Doc/library/email.errors.rst b/Doc/library/email.errors.rst index 9f0a9e2..294e3ed 100644 --- a/Doc/library/email.errors.rst +++ b/Doc/library/email.errors.rst @@ -25,7 +25,8 @@ The following exception classes are defined in the :mod:`email.errors` module: Raised under some error conditions when parsing the :rfc:`2822` headers of a message, this class is derived from :exc:`MessageParseError`. It can be raised - from the :meth:`Parser.parse` or :meth:`Parser.parsestr` methods. + from the :meth:`Parser.parse <email.parser.Parser.parse>` or + :meth:`Parser.parsestr <email.parser.Parser.parsestr>` methods. Situations where it can be raised include finding an envelope header after the first :rfc:`2822` header of the message, finding a continuation line before the @@ -37,7 +38,8 @@ The following exception classes are defined in the :mod:`email.errors` module: Raised under some error conditions when parsing the :rfc:`2822` headers of a message, this class is derived from :exc:`MessageParseError`. It can be raised - from the :meth:`Parser.parse` or :meth:`Parser.parsestr` methods. + from the :meth:`Parser.parse <email.parser.Parser.parse>` or + :meth:`Parser.parsestr <email.parser.Parser.parsestr>` methods. Situations where it can be raised include not being able to find the starting or terminating boundary in a :mimetype:`multipart/\*` message when strict parsing @@ -46,19 +48,20 @@ The following exception classes are defined in the :mod:`email.errors` module: .. exception:: MultipartConversionError() - Raised when a payload is added to a :class:`Message` object using - :meth:`add_payload`, but the payload is already a scalar and the message's - :mailheader:`Content-Type` main type is not either :mimetype:`multipart` or - missing. :exc:`MultipartConversionError` multiply inherits from - :exc:`MessageError` and the built-in :exc:`TypeError`. + Raised when a payload is added to a :class:`~email.message.Message` object + using :meth:`add_payload`, but the payload is already a scalar and the + message's :mailheader:`Content-Type` main type is not either + :mimetype:`multipart` or missing. :exc:`MultipartConversionError` multiply + inherits from :exc:`MessageError` and the built-in :exc:`TypeError`. - Since :meth:`Message.add_payload` is deprecated, this exception is rarely raised - in practice. However the exception may also be raised if the :meth:`attach` + Since :meth:`Message.add_payload` is deprecated, this exception is rarely + raised in practice. However the exception may also be raised if the + :meth:`~email.message.Message.attach` method is called on an instance of a class derived from :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. :class:`~email.mime.image.MIMEImage`). -Here's the list of the defects that the :class:`~email.mime.parser.FeedParser` +Here's the list of the defects that the :class:`~email.parser.FeedParser` can find while parsing messages. Note that the defects are added to the message where the problem was found, so for example, if a message nested inside a :mimetype:`multipart/alternative` had a malformed header, that nested message @@ -97,9 +100,9 @@ this class is *not* an exception! This defect has not been used for several Python versions. * :class:`MultipartInvariantViolationDefect` -- A message claimed to be a - :mimetype:`multipart`, but no subparts were found. Note that when a message has - this defect, its :meth:`is_multipart` method may return false even though its - content type claims to be :mimetype:`multipart`. + :mimetype:`multipart`, but no subparts were found. Note that when a message + has this defect, its :meth:`~email.message.Message.is_multipart` method may + return false even though its content type claims to be :mimetype:`multipart`. * :class:`InvalidBase64PaddingDefect` -- When decoding a block of base64 enocded bytes, the padding was not correct. Enough padding is added to |