"Chris Withers" <[EMAIL PROTECTED]> wrote:
> Jeffrey P Shell wrote:
>>
>> _getOb and _setOb are for placing subobjects somewhere besides attributes
>> (which is the default implementation).
>
> When would __getattr__ be used then?
>
In what context? You could wire __getattr__ to call into _getOb (and
probably __getitem__ too, since that's also used in traversal and as a way
of getting non-Pythonic ID'd objects).
def __getattr__(self, attr):
return self._getOb(attr)
Until very recently, __getattr__ on persistent objects was like playing with
nuclear fire. But now, I *believe* it behaves properly, which means
__getattr__ gets called when it receives an unknown name. How that affects
Acquisition, I don't know.
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )