[Python-Dev] WindowsError repr
Tim Peters
tim_one@email.msn.com
Mon, 14 Aug 2000 21:01:55 -0400
[Mark Hammond]
> ...
> However, the _look_ of the error does change. After my fix, it now looks
> like:
>
> >>> os.listdir('/cow')
> ...
> WindowsError: [Errno 3] The system cannot find the path specified: '/cow'
> >>>
Thank you!
> AGAIN - I stress - catching "OSError" or "os.error" _will_ continue to
> work, as WindowsError derives from OSError. It just worries me
> that people will start explicitly catching "WindowsError", regardless
> of whatever documentation we might write on the subject.
>
> Does anyone see this as a problem? Should a WindowsError masquerade as
> "OSError", or maybe just look a little more like it - eg, "OSError
> (windows)" ??
I can assure you that nobody running on a Unix(tm) derivative is going to
catch WindowsError as such on purpose, so the question is how stupid are
Windows users? I say leave it alone and let them tell us <wink>.