[Python-Dev] win32 specific exception in the core?
Mark Hammond
mhammond@skippinet.com.au
Mon, 7 Feb 2000 21:56:51 +1100
[Moshe writes:]
> How about, for windows, to derive "many" error classes from OSError on
> Win32, and always return the right one?
Another alternative would be to derive from EnvironmentError. I would then
like to change the __str__ method from:
...
return '[Errno %s] %s: %s' % (self.errno, self.strerror,
...
to
return '[%s %s] %s: %s' % (self.getdesc(), self.errno, self.strerror,
Where getdesc() returns "OS Error", "IO Error" or "Win32 error"
respectively.
This all comes down to Guido tho. I believe he is away, so if he doesnt
respond Ill simply send him a summary of the discussions and he can decide
lickety-split!
Mark.