Message239692
| Author |
doerwalter |
| Recipients |
doerwalter, ezio.melotti, fdrake, martin.panter, pitrou, serhiy.storchaka |
| Date |
2015年03月31日.12:19:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1427804399.63.0.573981997764.issue19100@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The linked code at https://github.com/vadmium/python-iview/commit/68b0559 seems strange to me:
try:
text.encode(encoding, textio.errors or "strict")
except UnicodeEncodeError:
text = text.encode(encoding, errors).decode(encoding)
return text
is the same as:
return text.encode(encoding, errors).decode(encoding)
because when there are no unencodable characters in text, the error handler will never be invoked. |
|