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

Modified Files:
      Tag: Zope-2_7-branch
        Expressions.py 
Log Message:
Prevent 'render' function in Expressions.py for being called for basic types 
(minor speed improvement).  See  http://www.zope.org/Collectors/Zope/1890. 




=== Products/PageTemplates/Expressions.py 1.43.44.5 => 1.43.44.6 ===
--- Products/PageTemplates/Expressions.py:1.43.44.5     Fri Mar 25 14:39:03 2005
+++ Products/PageTemplates/Expressions.py       Sun Sep 25 09:44:01 2005
@@ -145,7 +145,9 @@
         return 0
 
     def _eval(self, econtext,
-              isinstance=isinstance, StringType=type(''), render=render):
+              isinstance=isinstance,
+              BasicTypes=(str, unicode, dict, list, tuple, bool),
+              render=render):
         for expr in self._subexprs[:-1]:
             # Try all but the last subexpression, skipping undefined ones.
             try:
@@ -161,7 +163,7 @@
             if self._hybrid:
                 return ob
 
-        if self._name == 'nocall' or isinstance(ob, StringType):
+        if self._name == 'nocall' or isinstance(ob, BasicTypes):
             return ob
         # Return the rendered object
         return render(ob, econtext.vars)

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to