Skip to content

Commit f3e7e86

Browse files
Mention email.policy.default as the modern alternative
1 parent 3c526b4 commit f3e7e86

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Doc/library/email.header.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ Here is the :class:`Header` class description:
164164
>>> from email.header import decode_header, make_header
165165
>>> str(make_header(decode_header('=?utf-8?q?Caf=C3=A9?=')))
166166
'Café'
167+
168+
Alternatively, messages parsed with the :data:`email.policy.default`
169+
policy decode their headers automatically.
167170

168171
.. versionchanged:: 3.2
169172
Added handling for the ``'unknown-8bit'`` charset.

0 commit comments

Comments
 (0)