Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: And on some system "Unknown error: nnn" is returned with no error indication.
Your concern that the patch is invalid on some unidentified system. This concern can easily be addressed by checking for NULL return *in addition* to the errno check. The real question is whether it is desirable to raise ValueError from strerror() when error code is out of bound. I would say the existing code intends to do exactly that, but th error check is incorrect on at least one popular platform. I believe it is better to raise an error because as a user, seeing "unknown error has occurred" message, is one of the worst experiences. On the other hand, if the consensus is that strerror() should always (short of out of memory condition) return a string, then (assuming null return is a possibility) the code needs to be changed to return "Unknown error: nnn" instead of raising an error. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2413> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com