[Python-Dev] Re: Change SystemError to NOT inherit from Exception

2019-07-04 Thread Brett Cannon
Jeroen Demeyer wrote: > On 2019-07-02 23:29, Brett Cannon wrote: > > But two, this would be a semantic shift of what > > classes directly inherit from BaseException. > > It depends how you interpret that. I always interpreted classes > inheriting directly from BaseException as exceptions that you

[Python-Dev] Re: Change SystemError to NOT inherit from Exception

2019-07-03 Thread Jeroen Demeyer
On 2019-07-02 23:29, Brett Cannon wrote: But two, this would be a semantic shift of what classes directly inherit from `BaseException`. It depends how you interpret that. I always interpreted classes inheriting directly from BaseException as exceptions that you almost never want to catch in

[Python-Dev] Re: Change SystemError to NOT inherit from Exception

2019-07-02 Thread Brett Cannon
There's two issues with this idea. One, backwards-compatibility, especially since the only good way to handle this would be to modify the exception-handling code to recognize this specific case during deprecation. But two, this would be a semantic shift of what classes directly inherit from

[Python-Dev] Re: Change SystemError to NOT inherit from Exception

2019-07-01 Thread Ivan Pozdeev via Python-Dev
On 01.07.2019 12:25, Jeroen Demeyer wrote: A SystemError is typically raised from C to indicate serious bugs in the application which shouldn't normally be caught and handled. It's used for example for NULL arguments where a Python object is expected. So in some sense, SystemError is the Python