Skip to content

Commit 2e2aaba

Browse files
gostak-ddmiss-islington
authored andcommitted
gh-123138: Updated email.headerregistry docs to include required keyword parse_tree (GH-134450)
(cherry picked from commit 2c20f9c) Co-authored-by: Gustaf <79180496+gostak-dd@users.noreply.github.com>
1 parent 8494bcf commit 2e2aaba

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Doc/library/email.headerregistry.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ headers.
9696
``kwds`` is a dictionary containing one pre-initialized key, ``defects``.
9797
``defects`` is an empty list. The parse method should append any detected
9898
defects to this list. On return, the ``kwds`` dictionary *must* contain
99-
values for at least the keys ``decoded`` and ``defects``. ``decoded``
100-
should be the string value for the header (that is, the header value fully
101-
decoded to unicode). The parse method should assume that *string* may
99+
values for at least the keys ``decoded``, ``defects`` and ``parse_tree``.
100+
``decoded`` should be the string value for the header (that is, the header
101+
value fully decoded to unicode). ``parse_tree`` is set to the parse tree obtained
102+
from parsing the header. The parse method should assume that *string* may
102103
contain content-transfer-encoded parts, but should correctly handle all valid
103104
unicode characters as well so that it can parse un-encoded header values.
104105

0 commit comments

Comments
 (0)