def defined_at():
 if DEBUG:
  frame = inspect.currentframe()
  while frame:
   try:
    if (frame.f_globals['__package__'] != __package__):
     break
   except KeyError:
    break
   frame = frame.f_back
  ret = Frame(frame.f_lineno, frame.f_globals.get('__package__'), frame.f_globals.get('__name__'), frame.f_code.co_filename)
  del frame
  return ret

def defined_at ( ) : if DEBUG : frame = inspect . currentframe ( ) while frame : try : if ( frame . f_globals [ '__package__' ] != __package__ ) : break except KeyError : break frame = frame . f_back ret = Frame ( frame . f_lineno , frame . f_globals . get ( '__package__' ) , frame . f_globals . get ( '__name__' ) , frame . f_code . co_filename ) del frame return ret
get definition location of a pattern or a match .