On Fri, 29 Jul 2016 15:55:07 +0200 Antoon Pardon <antoon.par...@rece.vub.ac.be> wrote: > I think the case where you just want to ignore the exception, but it > can at times be useful to get some extra logging information for > debuging purposes, is not that rare as you seem to suggest.
The way I handle that is: DEBUG = False # near top of file ... try: block except SomeException: if DEBUG: log("Blah blah blah") Usually it's in a class so it would be "self.DEBUG". You can also get fancy with debug levels instead of True and False. My theory is that if I need to log it today there's a more than zero chance I might need to log it again one day. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list