From 69ebfe43b07928b33799854d90134e4b68aad8e6 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Fri, 16 Mar 2012 22:03:17 -0400 Subject: [PATCH] #11780: document that email.encoders throw TypeError on multipart messages. --- Doc/library/email.encoders.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/email.encoders.rst b/Doc/library/email.encoders.rst index 5421b9f66f3..3c32c3bb425 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: