[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - ZPT.py:1.1.2.6

Steve Alexander steve@cat-box.net
Wed, 17 Apr 2002 18:33:02 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv20787/lib/python/Zope/PageTemplate

Modified Files:
      Tag: Zope-3x-branch
	ZPT.py 
Log Message:
Amended various modules to import Wrapper, getdict and getcontext from
Zope.ContextWrapper rather than Zope.ContextWrapper.wrapper

Added a SimpleMethodWrapper, which is a rather hacky python way of
rebinding methods so that the im_self gets wrapped.

Now, you'll get a SimpleMethodWrapper rather than a Wrapper when you
say from Zope.ContextWrapper import Wrapper

You say that a particular method should get its im_self rebound by
making it into a ContextMethod, in a similar way to making a staticmethod
or a classmethod.

See the testSimpleMethodWrapper.py module for an example.



=== Zope3/lib/python/Zope/PageTemplate/ZPT.py 1.1.2.5 => 1.1.2.6 ===
 """
 
-from Zope.ContextWrapper.wrapper import getinnerwrapper
+from Zope.ContextWrapper import getinnerwrapper
 from Zope.PageTemplate.PageTemplate import PageTemplate