On Thu, May 14, 2020 at 2:20 AM <chris.the.develope...@gmail.com> wrote:
>
> I'm working with developers that have decided to use asserts every time they 
> want to throw an exception. I feel that their should be something that 
> dissuades this behavior in the language design. This could be making asserts 
> not recoverable, making it so you can't stop assert failures from printing to 
> stdout, forcing the return code to -1 on process termination if an assert 
> fails, or something else.
>

There is something! Run your code with -OO and those asserts won't
happen any more. You can easily demonstrate that this will then break
their code, and thus prove that asserts are not the right tool to use.

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/6K366V32O5MZGWQRGEZFJKHFI4PJNJSE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to