parameters: (g)
return_statement: return names
docstring: Return list of (dotted-name, as-name or None) tuples for token source g.
  
      An as-name is the name that follows 'as' in an as clause.
docstring_summary: Return list of (dotted-name, as-name or None) tuples for token source g.
docstring_tokens: Return list of ( dotted - name as - name or None ) tuples for token source g .
function: def _getnamelist(g):
      """Return list of (dotted-name, as-name or None) tuples for token source g.
  
      An as-name is the name that follows 'as' in an as clause.
      """
      names = []
      while True:
          name, token = _getname(g)
          if not name:
              break
          if token == 'as':
              name2, token = _getname(g)
          else:
              name2 = None
          names.append((name, name2))
          while token != "," and "\n" not in token:
              token = next(g)[1]
          if token != ",":
              break
      return names
function_tokens: def _getnamelist ( g ) : names = [ ] while True : name , token = _getname ( g ) if not name : break if token == 'as' : name2 , token = _getname ( g ) else : name2 = None names . append ( ( name , name2 ) ) while token != "," and "\n" not in token : token = next ( g ) [ 1 ] if token != "," : break return names