def re_sub(*args):
 if TIMING:
  start = time.time()
  if isinstance(args[0], TimingRe):
   retval = args[0].sub(*args[1:])
  else:
   retval = re.sub(*args)
  end = time.time()
  delta = (end - start)
  if (delta > 0.01):
   print delta, ' DCTB ', args
 else:
  retval = re.sub(*args)
 return retval

def re_sub ( * args ) : if TIMING : start = time . time ( ) if isinstance ( args [ 0 ] , TimingRe ) : retval = args [ 0 ] . sub ( * args [ 1 : ] ) else : retval = re . sub ( * args ) end = time . time ( ) delta = ( end - start ) if ( delta > 0.01 ) : print delta , ' DCTB ' , args else : retval = re . sub ( * args ) return retval
a version of re .