[Python-ideas] Runtime assertion with no overhead when not active

Chris Angelico rosuav at gmail.com
Tue May 8 13:38:16 EDT 2018


On Wed, May 9, 2018 at 1:51 AM, Eloi Gaudry <Eloi.Gaudry at fft.be> wrote:
> I think that is a difference between:
> - the current 'assert' which usage seems (to me) to focus on
> development correctness (I think of it as the C-assert enabled in any C
> program in debug build )
> - the runtime_assert that I submitted on the list, which would be
> focusing on usage correctness (hence runtime), and easily disabled at
> runtime (when the python command line options parsing is not an option,
> for instance when the python interpreter is not python itself and/or
> when the consumer/extension wants to behave differently).

What's the difference between "development correctness" and "usage
correctness"? Does the latter depend on user input at run time? I
still don't understand the distinction you're trying to make here.

ChrisA


More information about the Python-ideas mailing list