This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jdemeyer
Recipients jdemeyer, lemburg, serhiy.storchaka, vstinner
Date 2019-07-01.09:17:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561972664.34.0.878651854006.issue37406@roundup.psfhosted.org>
In-reply-to
Content
> Python's exception mechanism is a much better way to signal and handle such errors at the application level.

I disagree. There is a difference between exceptions which are possible in normal usage of the code and real bugs, which shouldn't ever happen. A NULL argument to a C API function is not an ordinary exception, it's a real bug. Even if we raise a Python exception for that, it should never be handled in a try/exception block like an ordinary exception.

> Using assert() in C is a pretty bad alternative, since this crashes the whole process.

I *prefer* debugging an assert() failure (which is pretty easy with a decent debugger) rather than debugging a Python exception raised from C (which typically does NOT give a useful traceback).
History
Date User Action Args
2019-07-01 09:17:44jdemeyersetrecipients: + jdemeyer, lemburg, vstinner, serhiy.storchaka
2019-07-01 09:17:44jdemeyersetmessageid: <1561972664.34.0.878651854006.issue37406@roundup.psfhosted.org>
2019-07-01 09:17:44jdemeyerlinkissue37406 messages
2019-07-01 09:17:44jdemeyercreate