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

2019年7月02日 23:01:10 -0700

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 an "except Exception" block.
Adding `SystemError` to that list would make it a unique error condition that 
doesn't inherit from `Exception`.
I would argue that the various exception classes inheriting from BaseException are already quite unique: a KeyboardInterrupt is very different from a GeneratorExit for example.
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/U7CDZYS7WMJ2EIS3PQCE7WQMKUT7FFX6/

Reply via email to