[Zope-Checkins] CVS: Zope27/lib/python/Products/PageTemplates - TALES.py:1.30.8.2

Fred L. Drake, Jr. fdrake@acm.org
Tue, 17 Sep 2002 13:28:34 -0400


Update of /cvs-repository/Zope27/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv25881

Modified Files:
      Tag: Zope-2_7-development-branch
	TALES.py 
Log Message:
SafeMapping.has_get():  Removed; no longer called.

Context.evaluate():  Don't save value to a local before returning it.

TALESTracebackSupplement.getInfo():  Remove extraneous return.


=== Zope27/lib/python/Products/PageTemplates/TALES.py 1.30.8.1 => 1.30.8.2 ===
--- Zope27/lib/python/Products/PageTemplates/TALES.py:1.30.8.1	Tue Aug 20 16:17:02 2002
+++ Zope27/lib/python/Products/PageTemplates/TALES.py	Tue Sep 17 13:28:33 2002
@@ -42,8 +42,6 @@
     '''Retain Default'''
 Default = Default()
 
-_marker = []
-
 class SafeMapping(MultiMapping):
     '''Mapping with security declarations and limited method exposure.
 
@@ -58,9 +56,6 @@
     _push = MultiMapping.push
     _pop = MultiMapping.pop
 
-    def has_get(self, key, _marker=[]):
-        v = self.get(key, _marker)
-        return v is not _marker, v
 
 class Iterator(ZTUtils.Iterator):
     def __init__(self, name, seq, context):
@@ -214,8 +209,7 @@
             expression = self._engine.compile(expression)
         __traceback_supplement__ = (
             TALESTracebackSupplement, self, expression)
-        v = expression(self)
-        return v
+        return expression(self)
 
     evaluateValue = evaluate
 
@@ -250,7 +244,6 @@
         self.position = position
 
 
-
 class TALESTracebackSupplement:
     """Implementation of ITracebackSupplement"""
     def __init__(self, context, expression):
@@ -269,8 +262,6 @@
         else:
             from cgi import escape
             return '<b>Names:</b><pre>%s</pre>' % (escape(s))
-        return None
-
 
 
 class SimpleExpr:
@@ -282,4 +273,3 @@
         return self._name, self._expr
     def __repr__(self):
         return '<SimpleExpr %s %s>' % (self._name, `self._expr`)
-