def _boundary_of_alternatives_indices(pattern):
 end_pos = None
 for match in re.finditer('\\)', pattern):
  if (not _position_is_bracketed(pattern, match.start())):
   end_pos = match.start()
   break
 start_pos = None
 for match in re.finditer('\\(', pattern[:end_pos]):
  if (not _position_is_bracketed(pattern, match.start())):
   start_pos = match.end()
 return (start_pos, end_pos)

def _boundary_of_alternatives_indices ( pattern ) : end_pos = None for match in re . finditer ( '\\)' , pattern ) : if ( not _position_is_bracketed ( pattern , match . start ( ) ) ) : end_pos = match . start ( ) break start_pos = None for match in re . finditer ( '\\(' , pattern [ : end_pos ] ) : if ( not _position_is_bracketed ( pattern , match . start ( ) ) ) : start_pos = match . end ( ) return ( start_pos , end_pos )
determines the location of a set of alternatives in a glob pattern .