def iter_stack_frames(frames=None):
 if (not frames):
  frames = inspect.stack()[1:]
 for (frame, lineno) in ((f[0], f[2]) for f in frames):
  f_locals = getattr(frame, 'f_locals', {})
  if _getitem_from_frame(f_locals, '__traceback_hide__'):
   continue
  (yield (frame, lineno))

def iter_stack_frames ( frames = None ) : if ( not frames ) : frames = inspect . stack ( ) [ 1 : ] for ( frame , lineno ) in ( ( f [ 0 ] , f [ 2 ] ) for f in frames ) : f_locals = getattr ( frame , 'f_locals' , { } ) if _getitem_from_frame ( f_locals , '__traceback_hide__' ) : continue ( yield ( frame , lineno ) )
given an optional list of frames .