[Python-checkins] cpython (2.7): #11780: document that email.encoders throw TypeError on multipart messages.

r.david.murray python-checkins at python.org
Sat Mar 17 03:06:25 CET 2012


http://hg.python.org/cpython/rev/c894e2ea9ff7
changeset:   75765:c894e2ea9ff7
branch:      2.7
parent:      75745:3d4d52e47431
user:        R David Murray <rdmurray at bitdance.com>
date:        Fri Mar 16 22:06:08 2012 -0400
summary:
  #11780: document that email.encoders throw TypeError on multipart messages.

files:
  Doc/library/email.encoders.rst |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Doc/library/email.encoders.rst b/Doc/library/email.encoders.rst
--- a/Doc/library/email.encoders.rst
+++ b/Doc/library/email.encoders.rst
@@ -18,6 +18,10 @@
 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:
 
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list