def notify_info_yielded(event):
 def decorator(generator):
  def decorated(*args, **kwargs):
   for v in generator(*args, **kwargs):
    send(event, info=v)
    (yield v)
  return decorated
 return decorator

def notify_info_yielded ( event ) : def decorator ( generator ) : def decorated ( * args , ** kwargs ) : for v in generator ( * args , ** kwargs ) : send ( event , info = v ) ( yield v ) return decorated return decorator
makes a generator send the event event every time it yields .