#NEWLINE# def parse_query( self ) : #NEWLINE# #INDENT# search_terms = self . query . split ( ) #NEWLINE# self . ignore_items = [ t [ 1 : ] for t in search_terms if ( t [ 0 ] == '-' ) ] #NEWLINE# self . use_words = [ x for x in search_terms if ( ( x [ 0 ] != '-' ) and ( x [ 0 ] != TAG_QUERY_CHAR ) ) ] #NEWLINE# self . use_tags = [ t [ 1 : ] for t in search_terms if ( t [ 0 ] == TAG_QUERY_CHAR ) ] #NEWLINE# self . ignore_tags = [ t [ 1 : ] for t in self . ignore_items if ( ( len ( t ) > 2 ) and ( t [ 0 ] == TAG_QUERY_CHAR ) ) ] #NEWLINE# self . ignore_words = [ t for t in self . ignore_items if ( ( len ( t ) > 2 ) and ( t [ 0 ] != TAG_QUERY_CHAR ) ) ]