[issue18139] email module should have a way to prepend and insert headers

Barry A. Warsaw report at bugs.python.org
Wed Jun 5 16:07:49 CEST 2013


Barry A. Warsaw added the comment:

In a somewhat similar vein, replace_header() retains the original header order.  Not quite what the OP wants, but useful.

The problem I had originally with a position-aware method is getting the API right.  I didn't want to add a position argument to add_header() (and still don't).  So I think a position-aware API would have to be a different method, perhaps with an API somewhat like list.insert()?  It doesn't look like OrderedDict provides any guidance here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18139>
_______________________________________


More information about the Python-bugs-list mailing list