Skip to content

Commit 2c20f9c

Browse files
authored
gh-123138: Updated email.headerregistry docs to include required keyword parse_tree (GH-134450)
1 parent 1e18c45 commit 2c20f9c

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
@@ -93,9 +93,10 @@ headers.
9393
``kwds`` is a dictionary containing one pre-initialized key, ``defects``.
9494
``defects`` is an empty list. The parse method should append any detected
9595
defects to this list. On return, the ``kwds`` dictionary *must* contain
96-
values for at least the keys ``decoded`` and ``defects``. ``decoded``
97-
should be the string value for the header (that is, the header value fully
98-
decoded to unicode). The parse method should assume that *string* may
96+
values for at least the keys ``decoded``, ``defects`` and ``parse_tree``.
97+
``decoded`` should be the string value for the header (that is, the header
98+
value fully decoded to unicode). ``parse_tree`` is set to the parse tree obtained
99+
from parsing the header. The parse method should assume that *string* may
99100
contain content-transfer-encoded parts, but should correctly handle all valid
100101
unicode characters as well so that it can parse un-encoded header values.
101102

0 commit comments

Comments
 (0)