[Zope3-checkins] CVS: Zope3/lib/python/Zope/ContextWrapper - SimpleMethodWrapper.py:1.9

Jeremy Hylton jeremy@zope.com
Tue, 3 Dec 2002 15:07:12 -0500


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

Modified Files:
	SimpleMethodWrapper.py 
Log Message:
Revert previous checkin.  It doesn't work with Python 2.2.2.

Note to someone who wants to dig deeper:  The variable attr has a
method-wrapper for __getitem__().  (See PyWrapper_New() in
descrobject.c.)  This object has __call__, __name__, and __doc__, but
not __get__.



=== Zope3/lib/python/Zope/ContextWrapper/SimpleMethodWrapper.py 1.8 => 1.9 ===
--- Zope3/lib/python/Zope/ContextWrapper/SimpleMethodWrapper.py:1.8	Tue Dec  3 11:21:13 2002
+++ Zope3/lib/python/Zope/ContextWrapper/SimpleMethodWrapper.py	Tue Dec  3 15:07:11 2002
@@ -81,12 +81,7 @@
             
         return Wrapper.__getattribute__(self, name)
 
-    # this is a hack - __getattribute_ doesn't wrap special __ methods,
-    # and this one needs to be wrapped for PrincipalAnnotationService.
-    # some more general solution ought to be found at some point.
-    def __getitem__(self, key):
-        attr = Wrapper.__getattribute__(self, '__getitem__')
-        return attr.__get__(self)(key)
+
 
     def __setattr__(self, name, value):
         """Support for ContextProperty.__set__"""