Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment: On Fri, Mar 25, 2011 at 01:51:46PM +0000, R. David Murray wrote: > I now think it is incorrect that an 8bit header causes getitem > to return a Header object. > I think instead it should be returning the stringified version > of the header, including the unknown-8bit encoding.
It seems to be much better to either return only strings or only objects. You've prominently documented that (in a model generated from bytes) objects are returned, and *DesignThoughts* states that *all* headers will be represented as objects in the upcoming package, so it's my guess that many people who are currently programming email things using Py3K go for Header. Thus, to give you a neat NONONO - why not simply allowing header objects for decode_header(), too? :) ---------- title: email.decode_header fails if msg.__getitem__ returns Header object -> email.decode_header fails if msg.__getitem__ returns Header object _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11584> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com