Mark Hammond <mhammond@skippinet.com.au> wrote: > As part of the registry work, Im toying with the idea of a standard = "win32 > exception" error in the Python core. >=20 > The reasons why I think a standard exception would be useful are: >=20 > * Single body of code that knows how to raise these exceptions. Eg, > whenever an extension module needs to report that a Win32 API function > failed, they can use the core routines to create the exception object = - just > like they can with OSError. This ensures consistency, and saves each > extension module author from reinventing the wheel. >=20 > * No confusion about what exception Python programmers should catch. = In the > same way that "OSError" will be thrown any time the C runtime library = fails, > the "Win32Error" exception will be thrown whenever a Win32 API = function > (called directly) fails. any reason you can't just throw OSError exceptions? (after all, Windows is an operating system, right? ;-) </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4