Message101042
| Author |
ezio.melotti |
| Recipients |
ezio.melotti, srid |
| Date |
2010年03月14日.07:18:43 |
| SpamBayes Score |
5.5045144e-05 |
| Marked as misclassified |
No |
| Message-id |
<1268551126.82.0.493180719239.issue6780@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here is a proof of concept that solves the problem for unicode strings and startswith/endswith.
If during the conversion to Unicode a TypeError is raised (e.g. TypeError: Can't convert 'list' object to str implicitly), the error message is changed to "TypeError: startswith first arg must be str, unicode, or tuple, not list".
If the error is not a TypeError (e.g. a UnicodeDecodeError) the behavior is unchanged.
I haven't tested the patch thoroughly, but if this approach is OK I will prepare a complete patch. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年03月14日 07:18:47 | ezio.melotti | set | recipients:
+ ezio.melotti, srid |
| 2010年03月14日 07:18:46 | ezio.melotti | set | messageid: <1268551126.82.0.493180719239.issue6780@psf.upfronthosting.co.za> |
| 2010年03月14日 07:18:45 | ezio.melotti | link | issue6780 messages |
| 2010年03月14日 07:18:44 | ezio.melotti | create |
|