Re: Append behavior of __setitem__

Tony Nelson <[email protected]>
Newsgroups gmane.comp.python.mime.devel
Message-ID <p04330102c6091bdd78d4@[192.168.123.162]>
At 10:05 -0400 04/13/2009, Barry Warsaw wrote:

>On Apr 11, 2009, at 5:17 PM, Tony Nelson wrote:
>
>>Sure. The header field should be parsed, if possible, and possibly add a
>>defect to the message. For some header fields, the data should be added
>>to the previous Header instance; for others, an extra Header instance
>>might need to be created.
>
>I don't follow this part.

When a duplicate header field is parsed, errors are made into defects.  If
duplicates are not allowed for that header field, the contents should be
added to the previous header if that is possible (Subject:, just append
with whitespace; address headers, just append addresses), or a new
(improper) Header should be created if it is not possible to add to the
previous Header (Message-ID:, Content-Type:).

OK, those examples for extra Headers aren't good; it may be that they only
produce message defects.
-- 
____________________________________________________________________
TonyN.:'                       <mailto:[email protected]>
      '                              <http://www.georgeanelson.com/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.