I love assert

Ethan Furman ethan at stoneleaf.us
Sun Nov 30 14:34:59 EST 2014


On 11/30/2014 12:18 AM, Steven D'Aprano wrote:
> 
> Ah, wait, I see the reference. You're talking about the quote from James O
> Coplien:
> 
>     "An even more professional approach is to leave the assertions 
>     in the code when you ship, and to automatically file a bug report
>     on behalf of the end user and perhaps to try to re-start the 
>     application every time an assertion fails."
> 
> 
> Sounds reasonable to me (modulo privacy considerations). Many modern
> software already does this: Firefox, Windows, KDE all have forms of crash
> reporting that will automatically submit bug reports to the developers for
> you. And Firefox at least will try (and generally succeed) to automatically
> restart after a crash.

The error-catching/reporting/restarting framework is fine.  My assertion (pun intended) is that building that framework
on assert, which can be unknowingly disabled by the end-user, is foolish.

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20141130/aab1351a/attachment.sig>


More information about the Python-list mailing list