Message196292
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:12 | r.david.murray | set | recipients:
+ r.david.murray, barry |
2013-08-27 14:05:12 | r.david.murray | set | messageid: <1377612312.75.0.466824716408.issue18854@psf.upfronthosting.co.za> |
2013-08-27 14:05:12 | r.david.murray | link | issue18854 messages |
2013-08-27 14:05:12 | r.david.murray | create | |
|