[Zope3-checkins] CVS: Zope3/src/zope/tales - tales.py:1.17

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 23 14:18:18 EST 2004


Update of /cvs-repository/Zope3/src/zope/tales
In directory cvs.zope.org:/tmp/cvs-serv17868/src/zope/tales

Modified Files:
	tales.py 
Log Message:


Added getValue(name, default) to engine.


=== Zope3/src/zope/tales/tales.py 1.16 => 1.17 ===
--- Zope3/src/zope/tales/tales.py:1.16	Thu Mar 18 09:57:58 2004
+++ Zope3/src/zope/tales/tales.py	Tue Mar 23 14:18:17 2004
@@ -667,6 +667,14 @@
         for vars in self._vars_stack:
             vars[name] = value
 
+    def getValue(self, name, default=None):
+        value = default
+        for vars in self._vars_stack:
+            value = vars.get(name, default)
+            if value is not default:
+                break
+        return value
+
     def setRepeat(self, name, expr):
         expr = self.evaluate(expr)
         if not expr:




More information about the Zope3-Checkins mailing list