From: R David Murray Date: Sat, 17 Mar 2012 02:06:08 +0000 (-0400) Subject: #11780: document that email.encoders throw TypeError on multipart messages. X-Git-Tag: v2.7.4rc1~958^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cc4e53d1d0af3e6b96b35858ffa4c11cd51e6ce;p=thirdparty%2FPython%2Fcpython.git #11780: document that email.encoders throw TypeError on multipart messages. --- diff --git a/Doc/library/email.encoders.rst b/Doc/library/email.encoders.rst index 5421b9f66f3c..3c32c3bb425d 100644 --- a/Doc/library/email.encoders.rst +++ b/Doc/library/email.encoders.rst @@ -18,6 +18,10 @@ exactly one argument, the message object to encode. They usually extract the payload, encode it, and reset the payload to this newly encoded value. They should also set the :mailheader:`Content-Transfer-Encoding` header as appropriate. +Note that these functions are not meaningful for a multipart message. They +must be applied to individual subparts instead, and will throw a +:exc:`TypeError` if passed a message whose type is multipart. + Here are the encoding functions provided: