[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces - traversing.py:1.4

Marius Gedminas mgedmin@codeworks.lt
Mon, 24 Mar 2003 11:42:51 -0500


Update of /cvs-repository/Zope3/src/zope/app/interfaces
In directory cvs.zope.org:/tmp/cvs-serv1757/src/zope/app/interfaces

Modified Files:
	traversing.py 
Log Message:
zope.app.traversing changes:
- canonicalPath() now actually makes the path canonical
- locationAsTuple() is gone
- traverse() now gets an adapter to ITraverser instead of hardcoding Traverser
- traverseName() now accepts a 'traversable' argument opening the way for
  optimizations
- some tests had to be updated

SteveA & Marius



=== Zope3/src/zope/app/interfaces/traversing.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/interfaces/traversing.py:1.3	Wed Mar 19 14:57:30 2003
+++ Zope3/src/zope/app/interfaces/traversing.py	Mon Mar 24 11:42:21 2003
@@ -86,7 +86,7 @@
 class ITraverser(Interface):
     """Provide traverse features"""
 
-    def traverse(path, default=_RAISE_KEYERROR):
+    def traverse(path, default=_RAISE_KEYERROR, request=None):
         """
         Return an object given a path.
 
@@ -98,5 +98,8 @@
         is relative to the current context.
 
         If the object is not found, return 'default' argument.
+
+        'request' is passed in when traversing from presentation code. This
+        allows paths like @@foo to work.
         """