Message170814
> 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). |
|
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 | |
|