This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:47ezio.melottisetrecipients: + ezio.melotti, srid
2010-03-14 07:18:46ezio.melottisetmessageid: <1268551126.82.0.493180719239.issue6780@psf.upfronthosting.co.za>
2010-03-14 07:18:45ezio.melottilinkissue6780 messages
2010-03-14 07:18:44ezio.melotticreate