
Dec. 25, 2012
9:49 p.m.
Rene Nejsum wrote:
Interessting alternatives, but they do not quite come on as flexible/usefull enough…
Often debug statements have a lot of text and variables, like:
log.debug( "The value of X, Y, Z is now: %d %s %d" % ( x, lookup(y), factorial(2**15))
That needn't be a problem: log.lazydebug(lambda: "The value of X, Y, Z is now: %d %s %d" % (x, lookup(y), factorial(2**15))) -- Greg