Hi,
I'm after a no-op command, so that i can redirect
logging commands in performance critical code.
Something like this:
def log(*args): print args
def null_log(*args): pass
if not DEBUG: log = null_log
is unacceptable because of the overhead of calling
functions in python.
log (about
On Wed, 13 Jul 2005 11:00:14 +1000, Simon Burton wrote:
Hi,
I'm after a no-op command, so that i can redirect
logging commands in performance critical code.
Something like this:
def log(*args): print args
def null_log(*args): pass
if not DEBUG: log = null_log
is unacceptable
On Wed, 13 Jul 2005 11:00:14 +1000, Simon Burton [EMAIL PROTECTED] wrote:
Hi,
I'm after a no-op command, so that i can redirect
logging commands in performance critical code.
Something like this:
def log(*args): print args
def null_log(*args): pass
if not DEBUG: log = null_log