Skip to content

Commit

Permalink
Merge branch 'master' into code-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
wheerd committed Jul 14, 2017
2 parents e8a352b + 00fe9b2 commit b184b16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matchpy/matching/many_to_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,12 +509,12 @@ def _collect_variable_renaming(
position[-1] += 1
if isinstance(expression, Operation):
if isinstance(expression, CommutativeOperation):
for operand in expression:
for operand in op_iter(expression):
position.append(0)
cls._collect_variable_renaming(operand, position, variables)
position.pop()
else:
for operand in expression:
for operand in op_iter(expression):
cls._collect_variable_renaming(operand, position, variables)

return variables
Expand Down

0 comments on commit b184b16

Please sign in to comment.