Message170814
| Author |
serhiy.storchaka |
| Recipients |
christian.heimes, loewis, serhiy.storchaka, vstinner |
| Date |
2012年09月20日.14:53:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1348152789.11.0.127738345027.issue15954@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> No, I think the appropriate error is ValueError, at least if errno is EINVAL.
With what message?
> msvcrt gives EILSEQ or ERANGE, but never EINVAL. EILSEQ is returned if LCMapString failed, and ERANE if the output buffer is too small.
I don't see where ERANE can be returned. If the output buffer is too small then the required buffer size (not including terminating null-char) should be returned.
I see the same issue with wcscoll() in locale.strcoll().
An alternative solution is in case of an error to return the original string (in locale.strxfrm) and to compare strings without regard locale (in locale.strcoll). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月20日 14:53:09 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, loewis, vstinner, christian.heimes |
| 2012年09月20日 14:53:09 | serhiy.storchaka | set | messageid: <1348152789.11.0.127738345027.issue15954@psf.upfronthosting.co.za> |
| 2012年09月20日 14:53:08 | serhiy.storchaka | link | issue15954 messages |
| 2012年09月20日 14:53:08 | serhiy.storchaka | create |
|