diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-09-26 21:57:29 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-09-26 21:57:29 (GMT) |
commit | fe21e4d4d76d3fd1efd16d124808d72a69588d7b (patch) | |
tree | 74e47a453633ae97d05f98cf18aeb361edb951e8 /Doc/library/email.mime.rst | |
parent | 081bbf6b28868774c1abca0a8469a517abb9f6cc (diff) | |
download | cpython-fe21e4d4d76d3fd1efd16d124808d72a69588d7b.zip cpython-fe21e4d4d76d3fd1efd16d124808d72a69588d7b.tar.gz cpython-fe21e4d4d76d3fd1efd16d124808d72a69588d7b.tar.bz2 |
Issue #16324: _charset parameter of MIMEText now also accepts email.charset.Charset instances.
Initial patch by Claude Paroz.
Diffstat (limited to 'Doc/library/email.mime.rst')
-rw-r--r-- | Doc/library/email.mime.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/email.mime.rst b/Doc/library/email.mime.rst index 4cdb322..950b1c6 100644 --- a/Doc/library/email.mime.rst +++ b/Doc/library/email.mime.rst @@ -195,7 +195,8 @@ Here are the classes: set of the text and is passed as an argument to the :class:`~email.mime.nonmultipart.MIMENonMultipart` constructor; it defaults to ``us-ascii`` if the string contains only ``ascii`` codepoints, and - ``utf-8`` otherwise. + ``utf-8`` otherwise. The *_charset* parameter accepts either a string or a + :class:`~email.charset.Charset` instance. Unless the *_charset* argument is explicitly set to ``None``, the MIMEText object created will have both a :mailheader:`Content-Type` header @@ -206,3 +207,6 @@ Here are the classes: ``Content-Transfer-Encoding`` header, after which a ``set_payload`` call will automatically encode the new payload (and add a new :mailheader:`Content-Transfer-Encoding` header). + + .. versionchanged:: 3.5 + *_charset* also accepts :class:`~email.charset.Charset` instances. |