Skip to content

Commit 1207167

Browse files
committed
docs(email): header's defects are not included in message's defects
1 parent 953b49e commit 1207167

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

Doc/library/email.compat32-message.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,8 @@ Here are the methods of the :class:`Message` class:
755755

756756
.. attribute:: defects
757757

758-
The *defects* attribute contains a list of all the problems found when
759-
parsing this message. See :mod:`email.errors` for a detailed description
760-
of the possible parsing defects.
758+
The *defects* attribute contains a list of problems found when parsing
759+
this message, excluding defects in message headers, as they are parsed
760+
and detected only when accessed. See :mod:`email.errors` for a detailed
761+
description of the possible parsing defects and
762+
:attr:`BaseHeader.defects<email.headerregistry.BaseHeader.defects>` for defects in headers.

Doc/library/email.message.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,11 @@ message objects.
731731

732732
.. attribute:: defects
733733

734-
The *defects* attribute contains a list of all the problems found when
735-
parsing this message. See :mod:`email.errors` for a detailed description
736-
of the possible parsing defects.
737-
734+
The *defects* attribute contains a list of problems found when parsing
735+
this message, excluding defects in message headers, as they are parsed
736+
and detected only when accessed. See :mod:`email.errors` for a detailed
737+
description of the possible parsing defects and
738+
:attr:`BaseHeader.defects<email.headerregistry.BaseHeader.defects>` for defects in headers.
738739

739740
.. class:: MIMEPart(policy=default)
740741

0 commit comments

Comments
 (0)