[Python-ideas] Efficient debug logging

Barry Warsaw barry at python.org
Thu Feb 16 14:39:15 EST 2017


On Feb 16, 2017, at 03:20 PM, M.-A. Lemburg wrote:

>I know some people will disagree, but IMO using "assert" is the wrong
>approach in such situations - it's meant for development and testing
>only, not as short-cut to avoid having to write a proper error
>handler :-)

I use assertions for "things that can never happen", although sometimes they
do due to an incomplete understanding of the code, the problem, or the
environment.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170216/795d4d21/attachment.sig>


More information about the Python-ideas mailing list