[Grok-dev] Traversing

Christian Theune ct at gocept.com
Fri Oct 20 04:23:51 EDT 2006


Philipp von Weitershausen wrote:
> Christian Theune wrote:
>> I just noticed that our traverser does not know what to do if traverse()
>> isn't defined.
> What do you mean?

Well, it knows what to do: nothing. =)

>> I stumbled over that when I switched our wiki to grok.Container. I
>> talked to Philipp shortly on IRC and he proposed not to do fallback to
>> attribute/dict access.
> It should obviously use the getitem protocol for containers. But I
> really don't think we want to support traversing to arbitrary attributes
> or keys like in Zope 2. It makes stuff accessible via URLs that
> shouldn't be accessible.
>> I somewhat agree. However, we have to define how grok.Container behaves.
> Yes. I agree that that is currently fishy.
>> 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.

Alright, I'll add that later today then, if nobody else objects.


gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20061020/a92601fc/signature.bin

More information about the Grok-dev mailing list