This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, r.david.murray
Date 2013-08-27.14:05:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
A 'message' part is not, in fact, a multipart in RFC terms.  (Only 'multipart' messages are multiparts.)  The email package models 'message' parts by making them single-element "multipart" messages, with the single element being a Message object representing the 'message' part's payload.

This is very useful; however, the fact that this is done should be documented in at least the is_multipart and walk methods.  As motivation for documenting this, consider a program that is looking for "the first part of type X" in a Message.  If an attached 'message' object has such a part, it would be discovered by a naive algorithm that uses 'walk', even though it is *inside* an attachment instead of part of the main message.  As for is_multipart, a naive reader of the documentation might expect that is_multipart would be true if and only if get_content_maintype == 'multipart', when this is in fact not true.

(I made these mistakes myself while implementing get_body and iter_parts in the new API additions.)
Date User Action Args
2013-08-27 14:05:12r.david.murraysetrecipients: + r.david.murray, barry
2013-08-27 14:05:12r.david.murraysetmessageid: <>
2013-08-27 14:05:12r.david.murraylinkissue18854 messages
2013-08-27 14:05:12r.david.murraycreate