[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Annotation - AttributeAnnotations.py:1.1.2.2

Steve Alexander steve@cat-box.net
Sun, 26 May 2002 14:21:19 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Annotation
In directory cvs.zope.org:/tmp/cvs-serv6102/lib/python/Zope/App/OFS/Annotation

Modified Files:
      Tag: Zope-3x-branch
	AttributeAnnotations.py 
Log Message:
Security-related management screens now work!

I've had to change the way use of Annotations is declared in classes
a little bit. I'll explain more about that in an email to
zope3-dev shortly.


=== Zope3/lib/python/Zope/App/OFS/Annotation/AttributeAnnotations.py 1.1.2.1 => 1.1.2.2 ===
     __implements__ = IAnnotations
 
-    def __init__(self,obj):
+    def __init__(self, obj):
+        # We could remove all proxies from obj at this point, but
+        # for now, we'll leave it to users of annotations to do that.
+        # Users of annotations will typically need to do their own
+        # unwrapping anyway.
         self.obj = obj
         
     def __getitem__(self, key):
@@ -41,7 +45,7 @@
         except AttributeError:
             return default
 
-    def __getattr__(self,attr):
+    def __getattr__(self, attr):
         try:
             return getattr(self.obj.__annotations__, attr)
         except AttributeError: