(self, bracket, qpart, block, columnIndex)
return None, None
Find matching bracket for the bracket.
        Return (block, columnIndex) or (None, None)
        Raise _TimeoutException, if time is over
Find matching bracket for the bracket.
        Return (block, columnIndex) or (None, None)
        Raise _TimeoutException, if time is over
Find matching bracket for the bracket . Return ( block columnIndex ) or ( None None ) Raise _TimeoutException if time is over
def _findMatchingBracket(self, bracket, qpart, block, columnIndex):
        """Find matching bracket for the bracket.
        Return (block, columnIndex) or (None, None)
        Raise _TimeoutException, if time is over
        """
        if bracket in self._START_BRACKETS:
            charsGenerator = self._iterateDocumentCharsForward(block, columnIndex + 1)
        else:
            charsGenerator = self._iterateDocumentCharsBackward(block, columnIndex)

        depth = 1
        oposite = self._OPOSITE_BRACKET[bracket]
        for b, c_index, char in charsGenerator:
            if qpart.isCode(b, c_index):
                if char == oposite:
                    depth -= 1
                    if depth == 0:
                        return b, c_index
                elif char == bracket:
                    depth += 1
        return None, None
def _findMatchingBracket ( self , bracket , qpart , block , columnIndex ) : if bracket in self . _START_BRACKETS : charsGenerator = self . _iterateDocumentCharsForward ( block , columnIndex + 1 ) else : charsGenerator = self . _iterateDocumentCharsBackward ( block , columnIndex ) depth = 1 oposite = self . _OPOSITE_BRACKET [ bracket ] for b , c_index , char in charsGenerator : if qpart . isCode ( b , c_index ) : if char == oposite : depth -= 1 if depth == 0 : return b , c_index elif char == bracket : depth += 1 return None , None