[Python-ideas] PEP 3151: Reworking the OS and IO exception hierarchy

Ivan Pozdeev vano at mail.mipt.ru
Sat Jul 24 18:37:42 CEST 2010

Здравствуйте, Nick.

Вы писали 24 июля 2010 г., 14:12:31:

> Why is that a problem? Some errnos *are* more important than others -
> they're the ones the regularly appear on the right hand side of "errno
> == <some_errno>" checks.

> Why would you consider new classes that would be based on a survey of
> the errnos that developers actually check for in published code to be
> "arbitrary"?

Since the list would be a sole opinion of some people who take part in
the survey, you'll be constantly faced with demands of other people
who want to have "shortcuts" for something else too.
And you won't be able to explain why your choice is more preferable than theirs.

> Any new IOError subclasses would likely still characterise classes of
> errors rather than single errno values.

The ones i see in the PEP correspond to either one or a few errnos.

If the problem is you don't like the 'cryptic' errno mnemonics, it's a
reason to change them instead. Current ones are just the standard
POSIX names the errors are long and widely known under.

 Ivan                          mailto:vano at mail.mipt.ru

More information about the Python-ideas mailing list