(self)
return len(code[i:j].expandtabs(self.tabwidth)) + extra
Return number of spaces the next line should be indented.

        Line continuation must be C_BRACKET.
Return number of spaces the next line should be indented.
Return number of spaces the next line should be indented .
def compute_bracket_indent(self):
        """Return number of spaces the next line should be indented.

        Line continuation must be C_BRACKET.
        """
        self._study2()
        assert self.continuation == C_BRACKET
        j = self.lastopenbracketpos
        code = self.code
        n = len(code)
        origi = i = code.rfind('\n', 0, j) + 1
        j = j+1     # one beyond open bracket
        # find first list item; set i to start of its line
        while j < n:
            m = _itemre(code, j)
            if m:
                j = m.end() - 1     # index of first interesting char
                extra = 0
                break
            else:
                # this line is junk; advance to next line
                i = j = code.find('\n', j) + 1
        else:
            # nothing interesting follows the bracket;
            # reproduce the bracket line's indentation + a level
            j = i = origi
            while code[j] in " \t":
                j = j+1
            extra = self.indentwidth
        return len(code[i:j].expandtabs(self.tabwidth)) + extra
def compute_bracket_indent ( self ) : self . _study2 ( ) assert self . continuation == C_BRACKET j = self . lastopenbracketpos code = self . code n = len ( code ) origi = i = code . rfind ( '\n' , 0 , j ) + 1 j = j + 1 # one beyond open bracket # find first list item; set i to start of its line while j < n : m = _itemre ( code , j ) if m : j = m . end ( ) - 1 # index of first interesting char extra = 0 break else : # this line is junk; advance to next line i = j = code . find ( '\n' , j ) + 1 else : # nothing interesting follows the bracket; # reproduce the bracket line's indentation + a level j = i = origi while code [ j ] in " \t" : j = j + 1 extra = self . indentwidth return len ( code [ i : j ] . expandtabs ( self . tabwidth ) ) + extra