[Python-Dev] Comments of the PEP 3151

Ethan Furman ethan at stoneleaf.us
Mon Jul 25 20:44:29 CEST 2011


Glenn Linderman wrote:
>   On 7/25/2011 3:43 AM, Antoine Pitrou wrote:
>> On Mon, 25 Jul 2011 15:28:47 +1000
>> Nick Coghlan <ncoghlan at gmail.com> wrote:
>>> > 
>>>> > > If we add EINTR, I don't know if it's better to add it to
>>>> > > BlockingIOError or to create a new exception (InterruptError?).
>>> > 
>>> > InterruptedError seems like a reasonable candidate for addition to me
>>> > - catch and retry in that case is something developers are likely to
>>> > want to do.
>> Ok, let's call it InterruptError then. InterruptedError sounds like the
>> error was interrupted ;)
>>
> 
> Sorry, no.  "InterruptError" sounds too much like a CPU interrupt 
> signal, which the error is not.

It does, a bit -- but is that something we need to worry about at the 
Python level?  Seems to me we should have the names make sense for 
Python, and not worry about what assembly, C, Pascal, Perl, or <insert 
language X here> names might mean for them.

>  "InterruptedError" is OK by me, I don't 
> see the confusion you do.  But maybe "InterruptedOperationError" would 
> be the most clear.  Way too long, of course, so maybe 
> "InterruptedAPIError" or "InterruptedOpError" or "EINTRError" in my 
> order of preference.

Please not that last one!  ;)

I prefer InterruptedError or InterruptError.

~Ethan~


More information about the Python-Dev mailing list