(self)
return NameList(names, start=pos, end=self._pos)
Parse a namelist.

        namelist ::= Name {',' Name}

        Returns:
          NameList(names)
Parse a namelist.
Parse a namelist .
def _namelist(self):
        """Parse a namelist.

        namelist ::= Name {',' Name}

        Returns:
          NameList(names)
        """
        pos = self._pos
        names = []
        name = self._accept(lexer.TokName)
        if name is None:
            return None
        names.append(name)
        last_pos = self._pos
        while self._accept(lexer.TokSymbol(b',')) is not None:
            name = self._accept(lexer.TokName)
            if name is None:
                # Don't eat the trailing separator if there is one.
                self._pos = last_pos
                break
            names.append(name)
            last_pos = self._pos

        return NameList(names, start=pos, end=self._pos)
def _namelist ( self ) : pos = self . _pos names = [ ] name = self . _accept ( lexer . TokName ) if name is None : return None names . append ( name ) last_pos = self . _pos while self . _accept ( lexer . TokSymbol ( b',' ) ) is not None : name = self . _accept ( lexer . TokName ) if name is None : # Don't eat the trailing separator if there is one. self . _pos = last_pos break names . append ( name ) last_pos = self . _pos return NameList ( names , start = pos , end = self . _pos )