[z3-five] Five traversal: view and object conflict

Philipp von Weitershausen philipp at weitershausen.de
Thu Mar 2 02:15:39 CET 2006


Hi there,

I just found a big problem with Five. Views seem to shadow contained
objects completely. For example, imagine:

  foo/       A folder
  foo/bar    A subitem
  foo/@@bar  A view registered for the folder

Now, we have the convention that for view lookup, we don't have to use
the @@ if it would unambigiously resolve to the view. If the @@ is left
out, however, attributes should take precedence. In Five, they seem NOT
to. In the above example, foo/bar resolves to the view. There is no way
for getting at the foo/bar object. Ever.

Right now, we currently do traversal this way:

1. find a Zope 3 view
2. use the object's custom __bobo_traverse__
3. do attribute look-up.

I propose that we move #1 to the end:

1. use the object's custom __bobo_traverse__
2. do attribute look-up.
3. find a Zope 3 view


Even though one might think that this is a strong change in behaviour, I
think it is a fix for an immense bug. I would even consider bringing out
another 1.0.x release for the Zope 2.8 line.

What do you think?

Philipp



More information about the z3-five mailing list