[Checkins] SVN: zc.shortcut/trunk/src/zc/shortcut/proxy.py Turned all of the non-data descriptors into data descriptors so that

Jim Fulton jim at zope.com
Thu Apr 27 13:20:59 EDT 2006


Log message for revision 67656:
  Turned all of the non-data descriptors into data descriptors so that
  they take pecedence over proxied-object attributes, as they did
  before.
  

Changed:
  U   zc.shortcut/trunk/src/zc/shortcut/proxy.py

-=-
Modified: zc.shortcut/trunk/src/zc/shortcut/proxy.py
===================================================================
--- zc.shortcut/trunk/src/zc/shortcut/proxy.py	2006-04-27 17:20:56 UTC (rev 67655)
+++ zc.shortcut/trunk/src/zc/shortcut/proxy.py	2006-04-27 17:20:58 UTC (rev 67656)
@@ -36,6 +36,9 @@
             dec_impl = interface.implementedBy(type(inst))
             return declarations.Declaration(dec_impl, provided)
 
+    def __set__(self, inst, v):
+        raise TypeError("assignment not allowed")
+
 class Decorator(proxy.ProxyBase):
     "Overriding specification decorator base class"
     __providedBy__ = DecoratorSpecificationDescriptor()
@@ -74,6 +77,9 @@
             return self.funcs[1](cls)
         return self.funcs[0](inst)
 
+    def __set__(self, inst, v):
+        raise TypeError("assignment not allowed")
+
 class ProxyBase(proxy.ProxyBase):
 
     __slots__ = '__traversed_parent__', '__traversed_name__'



More information about the Checkins mailing list