![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: if not DEBUG: log = null_log
From: Bengt Richter <bokr@oz.net>
Date: Wed Jul 13 2005 - 04:25:35 CEST
On Wed, 13 Jul 2005 11:00:14 +1000, Simon Burton <simon@arrowtheory.com> wrote:
>
assert log(some, args) or True
would always make the call in debug mode, but would never raise the exception
if you use
if __debug__: log(some, args)
I think[1] you still the the if-test code, though that is pretty quick
[1] I thought is saw somewhere that
Regards,
|