Message89488
| Author |
r.david.murray |
| Recipients |
r.david.murray |
| Date |
2009年06月18日.01:36:14 |
| SpamBayes Score |
0.0014875162 |
| Marked as misclassified |
No |
| Message-id |
<1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
decode_header only accepts str as input. If the input contains no
encoded words, the output is str (ie: the input string) and None. If it
does contain encoded words, the output is pairs of bytes plus str
charset identifiers (or None). This makes it difficult to use this
function to decode headers, since one has to test for the special case
of str output when there are no encoded words.
I think decode_header should take bytes as input, and output (bytes.
str) pairs consistently.
In any case, the documentation is wrong since it says it returns
strings. The example is also wrong, since the actual output is:
[(b'p\xf6stal', 'iso-8859-1')] |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年06月18日 01:36:16 | r.david.murray | set | recipients:
+ r.david.murray |
| 2009年06月18日 01:36:16 | r.david.murray | set | messageid: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> |
| 2009年06月18日 01:36:14 | r.david.murray | link | issue6302 messages |
| 2009年06月18日 01:36:14 | r.david.murray | create |
|