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 vstinner
Recipients serhiy.storchaka, vstinner
Date 2016-04-16.09:27:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwazbDbJp3aiFce-ODpZG+i3mNXHRiPYfK07fmHcC6GK3w@mail.gmail.com>
In-reply-to <1460793758.51.0.304392536592.issue26776@psf.upfronthosting.co.za>
Content
Ah yes. Some months (years?) ago, i started to add assertions to fail if
some functions are called with an exception set.

Checking if an exception is set at runtime adds a low overhead. Maybe it's
better to fail with a fatal error (like an assertion error) in debug mode
(and do nothing in release mode).

But I'm not sure that developers of C extensions are all able to get a
Python compiled in debug mode :-/ That's also why I added a check a
runtime: raise a SystemError if a function with an exception set. I also
added PYTHONMALLOC=debug to make some debug checks easily available on
release builds.

The bug also reminds me my PEP 490 to chain exceptions. It would be
yet another option...

So well, I don't know what is the best option.
History
Date User Action Args
2016-04-16 09:27:24vstinnersetrecipients: + vstinner, serhiy.storchaka
2016-04-16 09:27:24vstinnerlinkissue26776 messages
2016-04-16 09:27:23vstinnercreate