From 217981d6cc32ffe7daf9c164cfaccd2d1d701f07 Mon Sep 17 00:00:00 2001
From: Jan Hoenig <hrominium@gmail.com>
Date: Fri, 16 Dec 2016 18:24:22 +0100
Subject: [PATCH] Added a transformation, which should get rid of sympy
 expressions.

Although expressions have args and function as a tree, args cannot be
modified. So tree-transformations are not possible.
Sympy has subs function, however it replaces all matched in any
subexpression, of the expression (i.e. not only in args but in args args
and so on).
---
 ast.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ast.py b/ast.py
index b0b91b80a..5a3602f41 100644
--- a/ast.py
+++ b/ast.py
@@ -302,7 +302,7 @@ class SympyAssignment(Node):
     def lhs(self, newValue):
         self._lhsSymbol = newValue
         self._isDeclaration = True
-        if isinstance(self._lhsSymbol, Field.Access) or isinstance(self._lhsSymbol, Indexed):
+        if isinstance(self._lhsSymbol, Field.Access) or isinstance(self._lhsSymbol, sp.Indexed):
             self._isDeclaration = False
 
     @property
-- 
GitLab