debug print shortcut?

John Mudd mudd at
Sun Jun 6 14:28:09 CEST 2004

When debugging python, I add print statements such as these.  

print 'i=%s' % `i`
print 'foo()=%s' % `foo()`
print 'a,b,c=%s' % `a,b,c`

I just want to dump the value of a variable or expression.  But I
don't like having to type the expression twice, everytime.  I can
solve this in 'C' with a preprocessor macro.  Can it be solved in


More information about the Python-list mailing list