Adapters for the traversing mechanism.
Traverses objects via attribute and item lookup.
Provide traverse features.
traversePathElement(obj, name, further_path, default=<object object>, traversable=None, request=None)¶
Traverse a single step name relative to the given object.
This is used to implement
- name (str) – must be a string. ‘.’ and ‘..’ are treated specially, as well as names starting with ‘@’ or ‘+’. Otherwise name will be treated as a single path segment.
- further_path (list) – a list of names still to be traversed. This method is allowed to change the contents of further_path.
- traversable (ITraversable) – You can explicitly pass in
ITraversableas the traversable argument. If you do not, the given object will be adapted to
- request – assed in when traversing from presentation
code. This allows paths like
zope.location.interfaces.LocationError – if path cannot be found and ‘default was not provided.