Re: [Python-Dev] "DOS" error codes, WindowsError, and errno

2006-01-30 Thread Martin v. Löwis
Mark Hammond wrote: > I guess "too late" is purely a judgement call about breaking existing code. > One thing to our advantage is that I believe the most common errno > explicitly checked for will be ENOENT, which happily has the same value as > ERROR_FILE_NOT_FOUND. [Actually, checking 2 *or* 3 (

Re: [Python-Dev] "DOS" error codes, WindowsError, and errno

2006-01-30 Thread Martin v. Löwis
Guido van Rossum wrote: > WindowsError should have used a different name for the Windows-native > error code, so we could have defined both separately without > confusion. > > Is it too late to change WindowsError in that way? We could define a different exception, say, Win32Error which inherits

Re: [Python-Dev] "DOS" error codes, WindowsError, and errno

2006-01-30 Thread Mark Hammond
Guido: > What a mess. :-( > > WindowsError should have used a different name for the Windows-native > error code, so we could have defined both separately without > confusion. > > Is it too late to change WindowsError in that way? I guess "too late" is purely a judgement call about breaking existi

Re: [Python-Dev] "DOS" error codes, WindowsError, and errno

2006-01-30 Thread Guido van Rossum
What a mess. :-( WindowsError should have used a different name for the Windows-native error code, so we could have defined both separately without confusion. Is it too late to change WindowsError in that way? Unhelpfully, --Guido On 1/30/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > I ha

[Python-Dev] "DOS" error codes, WindowsError, and errno

2006-01-30 Thread Martin v. Löwis
I have a new implementation of stat/fstat/wstat which directly uses Win32 API, rather than using msvcrt. This works fine so far, except that error handling turns out to be tricky. mscvcrt maps errors (GetLastError()) into errno.h values, and also preserves the original error code in _doserrno. Cur