[Zope] Questions on Acquistion

scott kaplan skaplan@wso.williams.edu
Fri, 10 Dec 1999 19:31:26 -0500 (EST)


Hi all,
I have an odd question about acquistion, it has to do with acquiring
anything that starts with an underscore.  Can anyone explain this to me.
(I understand w/ inheritance of names that start with one underscore the
name is changed to privitize the variable, but this seems different)

Here is an example of what I am talking about:


    class C(ExtensionClass.Base):
      __color__='red'

    class A(Acquisition.Implicit):pass

    a=A()
    c=C()
    c.a=A()

    c.a.__color__
    Traceback (innermost last):
	File "<stdin>" line1 in ?
	AttributeError:__color__

but if we take off the underscore, the results are as we expect,

    class C(ExtensionClass.Base):   
        color='red'

    class A(Acquisition.Implicit):pass

    a=A()
    c=C()
    c.a=A()

    c.a.__color__                   
    'red'


This question comes out of a program that I am writing where I want the
subjobjects acquire the __ac_permissions__ of the containing folder.

Thanks,
Scott