[Zope-CVS] CVS: Packages/pypes/pypes - expression.py:1.13

Casey Duncan casey at zope.com
Thu Apr 29 23:05:04 EDT 2004


Update of /cvs-repository/Packages/pypes/pypes
In directory cvs.zope.org:/tmp/cvs-serv24622

Modified Files:
	expression.py 
Log Message:
Make sure or/and operations on expressions copy embedded syntax tree nodes before combining them.


=== Packages/pypes/pypes/expression.py 1.12 => 1.13 ===
--- Packages/pypes/pypes/expression.py:1.12	Wed Apr 21 01:25:52 2004
+++ Packages/pypes/pypes/expression.py	Thu Apr 29 23:05:01 2004
@@ -245,14 +245,14 @@
         return bindings
     
     def __or__(self, other):
-        left = self.ast().getChildNodes()[0]
-        right = other.ast().getChildNodes()[0]
+        left = deepcopy(self.ast().getChildNodes()[0])
+        right = deepcopy(other.ast().getChildNodes()[0])
         return self.fromAstNode(
             ast.Or((left, right)), self._combineBindings(other))
     
     def __and__(self, other):
-        left = self.ast().getChildNodes()[0]
-        right = other.ast().getChildNodes()[0]
+        left = deepcopy(self.ast().getChildNodes()[0])
+        right = deepcopy(other.ast().getChildNodes()[0])
         return self.fromAstNode(
             ast.And((left, right)), self._combineBindings(other))
     




More information about the Zope-CVS mailing list