A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-May/111183.html below:

[Python-Dev] Raise OSError or RuntimeError in the OS module?

[Python-Dev] Raise OSError or RuntimeError in the OS module? [Python-Dev] Raise OSError or RuntimeError in the OS module?Georg Brandl g.brandl at gmx.net
Tue May 3 20:30:22 CEST 2011
On 02.05.2011 12:06, Victor Stinner wrote:
> Hi,
> 
> I introduced recently the signal.pthread_sigmask() function (issue #8407). 
> pthread_sigmask() (the C function) returns an error code using errno codes. I 
> choosed to raise a RuntimeError using this error code, but I am not sure that 
> RuntimeError is the best choice. It is more an OS error than a runtime error: 
> should signal.pthread_sigmask() raise an OSError instead?
> 
> signal.signal() raises a RuntimeError if setting the signal handler failed. 
> signal.siginterrupt() raises also a RuntimeError on error.
> 
> signal.setitimer() and signal.getitimer() have their own exception class: 
> signal.ItimerError, raised on setimer() and getitimer() error.

If it has an errno, it should be a subclass of EnvironmentError.

Georg


More information about the Python-Dev mailing list

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