def _pred_pattern(match='<STR_LIT:*>', exclude='<STR_LIT>', patterntype='<STR_LIT>'):
m, x = match, exclude<EOL>if m == '<STR_LIT:*>':<EOL><INDENT>if not x:<EOL><INDENT>pred = lambda n: True<EOL><DEDENT>else:<EOL><INDENT>x = [x] if _is_str(x) else x<EOL>matcher = get_match_fun(x, patterntype)<EOL>pred = lambda n: not matcher(n)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>m = [m] if _is_str(m) else m<EOL>if not x:<EOL><INDENT>matcher = get_match_fun(m, patterntype)<EOL>pred = lambda n: matcher(n)<EOL><DEDENT>else:<EOL><INDENT>x = [x] if _is_str(x) else x<EOL>matcher_m = get_match_fun(m, patterntype)<EOL>matcher_x = get_match_fun(x, patterntype)<EOL>pred = lambda n: matcher_m(n) and not matcher_x(n)<EOL><DEDENT><DEDENT>return pred<EOL>
internal use