cpython: fcbc28ef96a3 (original) (raw)
Mercurial > cpython
changeset 82784:fcbc28ef96a3 3.3
Merge: #1525919: Document MIMEText+set_payload encoding behavior. [#1525919]
R David Murray rdmurray@bitdance.com | |
---|---|
date | Tue, 19 Mar 2013 18:21:22 -0400 |
parents | 6dcc9628065c(current diff)ba500b179c3a(diff) |
children | b9e07f20832e a5a0d87f3dcc |
files | Doc/library/email.mime.rst |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-)[+] [-] Doc/library/email.mime.rst 10 |
line wrap: on
line diff
--- a/Doc/library/email.mime.rst
+++ b/Doc/library/email.mime.rst
@@ -187,3 +187,13 @@ Here are the classes:
:class:~email.mime.nonmultipart.MIMENonMultipart
constructor; it defaults
to us-ascii
if the string contains only ascii
codepoints, and
utf-8
otherwise.
+
- Unless the
_charset
parameter is explicitly set toNone
, the - MIMEText object created will have both a :mailheader:
Content-Type
header - with a
charset
parameter, and a :mailheader:Content-Transfer-Endcoding
- header. This means that a subsequent
set_payload
call will not result - in an encoded payload, even if a charset is passed in the
set_payload
- command. You can "reset" this behavior by deleting the
Content-Transfer-Encoding
header, after which aset_payload
call- will automatically encode the new payload (and add a new
- :mailheader:
Content-Transfer-Encoding
header).