[Python-ideas] Exception for developer errors?
J.Demeyer at UGent.be
Wed Apr 10 18:14:54 EDT 2019
On 2019-04-11 00:09, Stefano Borini wrote:
> I occasionally found situations where I want to raise an exception for
> errors that can only arise because the developer made a mistake, for
I use AssertionError for this. An assertion failure means "this is a
bug", so that seems the right choice to me. You don't need to use an
actual assert statement, you can manually raise AssertionError too.
More information about the Python-ideas