Message248047
| Author |
Sebastian Kreft |
| Recipients |
Sebastian Kreft |
| Date |
2015年08月05日.15:18:43 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1438787925.35.0.0505694721939.issue24797@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The return type of email.header.decode_header is not consistent. When there are encoded parts the return type is a list of (bytes, charset or None) (Note that the documentation says it is a list of (str, charset)). However, when there are no encoded parts the return type is [(str, None)]. Note that, at the end of the function, there is a routine that converts everything to bytes.
Compare:
In [01]: email.header.decode_header('=?UTF-8?Q?foo?=bar')
Out[01]: [(b'foo', 'utf-8'), (b'bar', None)]
In [02]: email.header.decode_header('foobar')
Out[02]: [('foobar', None)] |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年08月05日 15:18:45 | Sebastian Kreft | set | recipients:
+ Sebastian Kreft |
| 2015年08月05日 15:18:45 | Sebastian Kreft | set | messageid: <1438787925.35.0.0505694721939.issue24797@psf.upfronthosting.co.za> |
| 2015年08月05日 15:18:45 | Sebastian Kreft | link | issue24797 messages |
| 2015年08月05日 15:18:43 | Sebastian Kreft | create |
|