[Checkins] SVN: five.pt/trunk/src/five/pt/pagetemplate.py Forward unused keyword-arguments using double-star keywords (incidentally, this API will be changed slightly with the newest Chameleon and this will make it compatible).

Malthe Borch mborch at gmail.com
Mon May 18 15:00:10 EDT 2009


Log message for revision 100095:
  Forward unused keyword-arguments using double-star keywords (incidentally, this API will be changed slightly with the newest Chameleon and this will make it compatible).

Changed:
  U   five.pt/trunk/src/five/pt/pagetemplate.py

-=-
Modified: five.pt/trunk/src/five/pt/pagetemplate.py
===================================================================
--- five.pt/trunk/src/five/pt/pagetemplate.py	2009-05-18 18:58:04 UTC (rev 100094)
+++ five.pt/trunk/src/five/pt/pagetemplate.py	2009-05-18 19:00:10 UTC (rev 100095)
@@ -5,9 +5,7 @@
 from Acquisition import aq_get
 from Acquisition import aq_inner
 from Acquisition import aq_parent
-
 from AccessControl import getSecurityManager
-
 from Products.PageTemplates.Expressions import SecureModuleImporter
 
 from z3c.pt import pagetemplate
@@ -21,20 +19,20 @@
     if condition:
         return a
     return b
-        
+
 class BaseTemplate(pagetemplate.BaseTemplate):
     """Zope 2-compatible page template class."""
-    
-    utility_builtins = {}
 
-    def render_macro(self, macro, global_scope=False, parameters=None):
+    utility_builtins = {}
+    
+    def render_macro(self, macro, parameters=None, **kw):
         context = self._pt_get_context(None, None)
-        
+
         if parameters is not None:
             context.update(parameters)
 
         return super(BaseTemplate, self).render_macro(
-            macro, global_scope=global_scope, parameters=context)
+            macro, parameters=context, **kw)
 
     def _pt_get_context(self, instance, request, kwargs={}):
         if instance is None:
@@ -65,6 +63,7 @@
     """Zope 2-compatible page template file class."""
 
 class ViewPageTemplate(pagetemplate.ViewPageTemplate):
+
     def _pt_get_context(self, view, request, kwargs):
         if view is None:
             namespace = {}



More information about the Checkins mailing list