I love being able to modify the arguments the get sent to a function, using settrace, like :
settrace
import sys def trace_func(frame,event,arg): va
The python debugger Pdb uses sys.settrace to analyse lines to debug.
Here's an c optimization/extension for pdb that also uses sys.settrace
https://bitbucket.org/jagguli/cpdb