[Grok-dev] Traversing

Martijn Faassen faassen at infrae.com
Fri Oct 20 04:24:07 EDT 2006


Christian Theune wrote:
> Martijn Faassen wrote:
>> Philipp von Weitershausen wrote:
>>> Christian Theune wrote:
>>>> The most simple solution I can imagine would be to define a default
>>>> traverse() on the container that does the dict lookup.
>>> That's a good solution.
>> Hm, I think I disagree.
>>
>>  I think in general objects should have whatever traversal behavior they
>> do normally, and let traverse() be available for override. We don't want
>> to *reimplement* its normal traversal behavior with traverse.
> 
> So our custom traverser would check whether we define traverse. If we
> do: call it. If not: defer to the "original" traverser?

Yes, that sounds like an easily predictable behavior.

> Philipp: Is there a way in the CA to express this?

Good question. :)

Regards,

Martijn


More information about the Grok-dev mailing list