diff --git a/mathics/core/pattern.py b/mathics/core/pattern.py index 14a7d8c25..2a17ba7bb 100644 --- a/mathics/core/pattern.py +++ b/mathics/core/pattern.py @@ -557,7 +557,7 @@ def match_element( if len(element_candidates) < match_count[0]: return - candidates = rest_expression[1] + candidates = tuple(rest_expression[1]) # "Artificially" only use more elements than specified for some kind # of pattern. @@ -901,7 +901,7 @@ def expression_pattern_match_element_orderless( ): needed = existing.elements else: - needed = [existing] + needed = (existing,) available = list(candidates) for needed_element in needed: if ( @@ -911,7 +911,15 @@ def expression_pattern_match_element_orderless( available.remove(needed_element) else: return set() - sets = [(needed, ([], available))] + sets = [ + ( + needed, + ( + [], + available, + ), + ) + ] if sets is None: sets = subsets( @@ -920,7 +928,7 @@ def expression_pattern_match_element_orderless( less_first=less_first, *set_lengths, ) - return sets + return tuple(((tuple(q) for q in s) for s in sets)) def expression_pattern_match_element_process_items( diff --git a/mathics/doc/latex/mathics-title.pdf b/mathics/doc/latex/mathics-title.pdf deleted file mode 100644 index 996fb5c97..000000000 Binary files a/mathics/doc/latex/mathics-title.pdf and /dev/null differ