[Zope-dev] Please comment [Re: self = self.this() in
Factory Methods]
Stefan H. Holek
stefan@epy.co.at
Thu, 07 Feb 2002 13:35:32 +0100
At 04.02.2002 21:10 +0100, Stefan H. Holek wrote:
>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?
As nobody seems to know (care?) I suggest, Andrew, you add that one line to
be on the safe side and to shut me up ;-). Zope's own UserFolder *does*
have it after all.
Case closed,
Stefan