Message101042
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. |
|
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 | |
|