parameters: (generator)
docstring: Get the mapping of generator local variables to their current values.
  
      A dict is returned, with the keys the local variable names and values the
      bound values.
docstring_summary: Get the mapping of generator local variables to their current values.
docstring_tokens: Get the mapping of generator local variables to their current values .
function: def getgeneratorlocals(generator):
      """
      Get the mapping of generator local variables to their current values.
  
      A dict is returned, with the keys the local variable names and values the
      bound values."""
  
      if not isgenerator(generator):
          raise TypeError("{!r} is not a Python generator".format(generator))
  
      frame = getattr(generator, "gi_frame", None)
      if frame is not None:
          return generator.gi_frame.f_locals
      else:
          return {}
function_tokens: def getgeneratorlocals ( generator ) : if not isgenerator ( generator ) : raise TypeError ( "{!r} is not a Python generator" . format ( generator ) ) frame = getattr ( generator , "gi_frame" , None ) if frame is not None : return generator . gi_frame . f_locals else : return { }