[Zope3-checkins] SVN: Zope3/branches/3.3/src/zope/ Address collector #583: Be crystal clear about the type of names in traversal

Philipp von Weitershausen philikon at philikon.de
Thu Aug 17 08:50:42 EDT 2006


Log message for revision 69595:
  Address collector #583: Be crystal clear about the type of names in traversal
  (be it path expressions or URL traversal).
  

Changed:
  U   Zope3/branches/3.3/src/zope/publisher/interfaces/__init__.py
  U   Zope3/branches/3.3/src/zope/traversing/interfaces.py

-=-
Modified: Zope3/branches/3.3/src/zope/publisher/interfaces/__init__.py
===================================================================
--- Zope3/branches/3.3/src/zope/publisher/interfaces/__init__.py	2006-08-17 12:37:51 UTC (rev 69594)
+++ Zope3/branches/3.3/src/zope/publisher/interfaces/__init__.py	2006-08-17 12:50:41 UTC (rev 69595)
@@ -165,7 +165,9 @@
     def publishTraverse(request, name):
         """Lookup a name
 
-        The request argument is the publisher request object.
+        The 'request' argument is the publisher request object.  The
+        'name' argument is the name that is to be looked up; it must
+        be an ASCII string or Unicode object.
 
         If a lookup is not possible, raise a NotFound error.
 
@@ -248,8 +250,9 @@
 
     def traverseName(request, ob, name):
         """Traverses to the next object.
-        """
 
+        Name must be an ASCII string or Unicode object."""
+
     def afterTraversal(request, ob):
         """Post-traversal hook.
 

Modified: Zope3/branches/3.3/src/zope/traversing/interfaces.py
===================================================================
--- Zope3/branches/3.3/src/zope/traversing/interfaces.py	2006-08-17 12:37:51 UTC (rev 69594)
+++ Zope3/branches/3.3/src/zope/traversing/interfaces.py	2006-08-17 12:50:41 UTC (rev 69595)
@@ -25,6 +25,7 @@
     """Marker interface to designate root objects
     """
 
+#TODO this does not seem to be used anywhere. Remove it? --philiKON
 class INamespaceHandler(Interface):
 
     def __call__(name, object, request):
@@ -72,9 +73,10 @@
         Should return the item corresponding to 'name' or raise
         TraversalError where appropriate.
 
-        furtherPath is a list of names still to be traversed. This method is
-        allowed to change the contents of furtherPath.
+        'name' is an ASCII string or Unicode object.
 
+        'furtherPath' is a list of names still to be traversed. This
+        method is allowed to change the contents of furtherPath.
         """
 
 _RAISE_KEYERROR = object()



More information about the Zope3-Checkins mailing list