[issue11584] email.decode_header fails if msg.__getitem__ returns Header object
Steffen Daode Nurpmeso
report at bugs.python.org
Fri Mar 25 15:23:14 CET 2011
Steffen Daode Nurpmeso <sdaoden at 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 <report at bugs.python.org>
<http://bugs.python.org/issue11584>
_______________________________________
More information about the Python-bugs-list
mailing list