R. David Murray added the comment:

My preliminary thought (and I haven't checked the code yet to make sure this 
will actually work), is that under the new email policies we are dealing with 
full-blown header objects, meaning that they can know the header name they 
represent.  This should theoretically make it possible to have a 'create 
header' function to create a header object (there may be one already...it's 
been way too long since I've worked on this code) and then have:

  message[:0] = [my_new_header]

do the right thing.  As well as all the other list methods working as expected. 
 We'd also want a 'find_header' method that takes the header name and returns 
the index of the header in the list.

But, as I say, this is just a preliminary thought, it needs careful 
consideration before we decide to actually do something.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18139>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to