[Zope-dev] Please comment [Re: self = self.this() in Factory Methods]

Stefan H. Holek stefan@epy.co.at
Mon, 04 Feb 2002 21:10:41 +0100


At 02.02.2002 08:08 +1000, Andrew Kenneth Milton wrote:

>Since it seems this is going to occur repeatedly, having spent 10 seconds
>looking at it, it seems that the 'correct' way is to call
>
>self.Destination()._setObject()
>
>so in essence self.Destination().__allow_groups__ will also get what we
>want.

The call is not needed most of the time as the dispatcher defines 
__getattr__(). It does however not define __setattr__().

I would still appreciate some comments on what kind of "bad things" can 
happen if the call to Destination() is omitted. Where will the attribute be 
set? Could the name __allow_groups__ be (accidentially) acquired?

Thanks again,
Stefan