#NEWLINE# def list_to_rule_string( alist , homify = True ) : #NEWLINE# #INDENT# rule_list = [ ] #NEWLINE# for word in alist : #NEWLINE# #INDENT# if homify : #NEWLINE# #INDENT# word = homify_text ( word ) #NEWLINE# #UNINDENT# rule_list . append ( word ) #NEWLINE# #UNINDENT# return '({})' . format ( ' | ' . join ( rule_list ) )