(self, node)
return b''.join(strs)
Calculates the text for the space and comment tokens that prefix the
        node.

        The base implementation returns text that represents all space and
        comment tokens verbatim.

        Args:
          node: The Node with possible space and comment tokens in its range,
            or None to just get spaces from the current token position.

        Returns:
          A string representing the tokens.
Calculates the text for the space and comment tokens that prefix the
        node.
Calculates the text for the space and comment tokens that prefix the node .
def _get_code_for_spaces(self, node):
        """Calculates the text for the space and comment tokens that prefix the
        node.

        The base implementation returns text that represents all space and
        comment tokens verbatim.

        Args:
          node: The Node with possible space and comment tokens in its range,
            or None to just get spaces from the current token position.

        Returns:
          A string representing the tokens.
        """
        if self._args.get('ignore_tokens'):
            return b'\n'

        strs = []
        while (((node is None and self._pos < len(self._tokens)) or
                (node is not None and self._pos < node.end_pos)) and
               (isinstance(self._tokens[self._pos], lexer.TokSpace) or
                isinstance(self._tokens[self._pos], lexer.TokNewline) or
                isinstance(self._tokens[self._pos], lexer.TokComment))):
            strs.append(self._tokens[self._pos].code)
            self._pos += 1
        return b''.join(strs)
def _get_code_for_spaces ( self , node ) : if self . _args . get ( 'ignore_tokens' ) : return b'\n' strs = [ ] while ( ( ( node is None and self . _pos < len ( self . _tokens ) ) or ( node is not None and self . _pos < node . end_pos ) ) and ( isinstance ( self . _tokens [ self . _pos ] , lexer . TokSpace ) or isinstance ( self . _tokens [ self . _pos ] , lexer . TokNewline ) or isinstance ( self . _tokens [ self . _pos ] , lexer . TokComment ) ) ) : strs . append ( self . _tokens [ self . _pos ] . code ) self . _pos += 1 return b'' . join ( strs )