Skip to content

Commit

Permalink
Fix pattern matching: pop optionals.
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindh-krishnamoorthy committed Nov 19, 2024
1 parent bf6a8c0 commit 85ad0f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mathics/core/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@ def match_expression_with_one_identity(
del parms["attributes"]
assert new_pattern is not None
new_pattern.match(expression=expression, pattern_context=parms)
for optional in optionals:
vars_dict.pop(optional)


def basic_match_expression(
Expand Down

0 comments on commit 85ad0f5

Please sign in to comment.