[z3-five] Traversal issue [was: 0.2 release]
Janko Hauser
jhauser at zscout.de
Fri Oct 1 11:48:33 MEST 2004
Philipp von Weitershausen wrote:
> The code in Sidnei's branch raises NotFoundError now except when it
> thinks it's being called from ZPT pathexpressions; then it returns None.
> As explained above, this is not correct behaviour. I suggested to solve
> the issue by implementing the following:
>
> - __bobo_traverse__ always raises AttributeError when it cannot
> traverse. This seems to be the overall expected behaviour.
>
> - for the ZPublisher, we don't want AttributeError showing but NotFound.
> To achieve this, we wrap __bobo_traverse__ in a descriptor that does the
> funky frame introspection and converts AttributeErrors into NotFound.
> That way the magic is at least contained in that descriptor.
>
> Objections?
>
I saw your remark on irc, do you think this would work with
ExtensionClass based objects? To overwrite this later in some classes
these need to be new_style?
__Janko
More information about the z3-five
mailing list