(self, block, column)
Search for a needle and return (block, column)
        Raise ValueError, if not found

        NOTE this methods ignores strings and comments
Search for a needle and return (block, column)
        Raise ValueError, if not found
Search for a needle and return ( block column ) Raise ValueError if not found
def findAnyBracketBackward(self, block, column):
        """Search for a needle and return (block, column)
        Raise ValueError, if not found

        NOTE this methods ignores strings and comments
        """
        depth = {'()': 1,
                 '[]': 1,
                 '{}': 1
                 }

        for foundBlock, foundColumn, char in self.iterateCharsBackwardFrom(block, column):
            if self._qpart.isCode(foundBlock.blockNumber(), foundColumn):
                for brackets in depth:
                    opening, closing = brackets
                    if char == opening:
                        depth[brackets] -= 1
                        if depth[brackets] == 0:
                            return foundBlock, foundColumn
                    elif char == closing:
                        depth[brackets] += 1
        raise ValueError('Not found')
def findAnyBracketBackward ( self , block , column ) : depth = { '()' : 1 , '[]' : 1 , '{}' : 1 } for foundBlock , foundColumn , char in self . iterateCharsBackwardFrom ( block , column ) : if self . _qpart . isCode ( foundBlock . blockNumber ( ) , foundColumn ) : for brackets in depth : opening , closing = brackets if char == opening : depth [ brackets ] -= 1 if depth [ brackets ] == 0 : return foundBlock , foundColumn elif char == closing : depth [ brackets ] += 1 raise ValueError ( 'Not found' )