(self, idx, skip_ws=True)
Returns the previous token relative to *idx*.

        If *skip_ws* is ``True`` (the default) whitespace tokens are ignored.
        ``None`` is returned if there's no previous token.
Returns the previous token relative to *idx*.
Returns the previous token relative to * idx * .
def token_prev(self, idx, skip_ws=True):
        """Returns the previous token relative to *idx*.

        If *skip_ws* is ``True`` (the default) whitespace tokens are ignored.
        ``None`` is returned if there's no previous token.
        """
        if idx is None:
            return None
        if not isinstance(idx, int):
            idx = self.token_index(idx)
        while idx != 0:
            idx -= 1
            if self.tokens[idx].is_whitespace() and skip_ws:
                continue
            return self.tokens[idx]
def token_prev ( self , idx , skip_ws = True ) : if idx is None : return None if not isinstance ( idx , int ) : idx = self . token_index ( idx ) while idx != 0 : idx -= 1 if self . tokens [ idx ] . is_whitespace ( ) and skip_ws : continue return self . tokens [ idx ]