#NEWLINE# def find_matching_bracket_position( self , start_pos = None , end_pos = None ) : #NEWLINE# #INDENT# "\n        Return relative cursor position of matching [, (, { or < bracket.\n\n        When `start_pos` or `end_pos` are given. Don't look past the positions.\n        " #NEWLINE# for ( A , B ) in ( '()' , '[]' , '{}' , '<>' ) : #NEWLINE# #INDENT# if ( self . current_char == A ) : #NEWLINE# #INDENT# return ( self . find_enclosing_bracket_right ( A , B , end_pos = end_pos ) or 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . current_char == B ) : #NEWLINE# #INDENT# return ( self . find_enclosing_bracket_left ( A , B , start_pos = start_pos ) or 0 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return 0