Dieter Maurer wrote:
> Florent Guillaume wrote at 2006-6-18 02:05 +0200:
>> ...
>>             if hasattr(object,'__bobo_traverse__'):
>>                 subobject=object.__bobo_traverse__(request, name)
> 
> If you are working on it, then you should implement a
> means that "__bobo_traverse__" can tell the caller that
> it should use the normal default.
> 
> This feature makes lots of "__bobo_traverse__" implementations
> much saner. A prominent example is the Archetypes' one.
> 
> 
> In our private Zope version, I have used an exception
> ("UseTraversalDefault") for this purpose.

I think that __bobo_traverse__ can raise AttributeError currently to
indicate that it has failed to look up an attribute and that traversal
should try other options. Apart from being a more explicit spelling,
what advantage would UseTraversalDefault have?

Philipp
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to