[Zope-CVS] CVS: Packages/pypes/pypes - expression.py:1.14 exceptions.py:1.6 interfaces.py:1.21

Casey Duncan casey at zope.com
Tue May 4 23:37:41 EDT 2004


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

Modified Files:
	expression.py exceptions.py interfaces.py 
Log Message:
Replace IndexRejects with more general CantProcess exception type
Add bindings() method to expressions


=== Packages/pypes/pypes/expression.py 1.13 => 1.14 ===
--- Packages/pypes/pypes/expression.py:1.13	Thu Apr 29 23:05:01 2004
+++ Packages/pypes/pypes/expression.py	Tue May  4 23:37:38 2004
@@ -85,6 +85,10 @@
                 _names.add(node.name)
             self.names(node, _names)
         return _names
+    
+    def bindings(self):
+        """Return the expression bindings dict"""
+        return self._bindings
         
     def freeNames(self, free_names=[], _tree=None, _names=None):
         """Return a list of names of free variable names in the expression. 


=== Packages/pypes/pypes/exceptions.py 1.5 => 1.6 ===
--- Packages/pypes/pypes/exceptions.py:1.5	Wed Apr 21 01:32:09 2004
+++ Packages/pypes/pypes/exceptions.py	Tue May  4 23:37:38 2004
@@ -18,6 +18,12 @@
 class PypesError(Exception):
 	"""General pypes error base"""
 
+class CantProcess(Exception):
+    """Cannot process requested operation. 
+    
+    An internal error used to signal to a caller to use an alernate method to
+    perform a given operation. Not general propagated to applications"""
+
 class PypesLookupError(PypesError, LookupError):
     """Persistent pypes component lookup failure"""
 
@@ -52,6 +58,3 @@
 
 class PypesQueryInputError(PypesQueryError):
     """Invalid input to pypes query"""
-    
-class IndexRejects(Exception):
-    """Index cannot process requested operation"""


=== Packages/pypes/pypes/interfaces.py 1.20 => 1.21 ===
--- Packages/pypes/pypes/interfaces.py:1.20	Wed Apr 21 01:32:09 2004
+++ Packages/pypes/pypes/interfaces.py	Tue May  4 23:37:38 2004
@@ -603,7 +603,13 @@
     
     def names():
         """Return a set of strings cooresponding to the names referenced in
-        the expression"""
+        the expression
+        """
+    
+    def bindings():
+        """Return a dict containing the names bound to the expression and
+        their cooresponding values.
+        """
         
     def freeNames(free_names=[]):
         """Return a set of free variable names in the expression. Variables
@@ -672,6 +678,9 @@
         
         criteria -- Criteria expression, an IExpression object used to determine
         the input items that appear in the result.
+        
+        If a particular combination of input_map and criteria arguments
+        cannot be processed, raise CantProcess.
         """
     
     def inputMap():




More information about the Zope-CVS mailing list