[Zope3-checkins] CVS: Zope3/src/zope/app/traversing - adapters.py:1.10

Steve Alexander steve@cat-box.net
Wed, 4 Jun 2003 04:47:03 -0400


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

Modified Files:
	adapters.py 
Log Message:
new style implements()


=== Zope3/src/zope/app/traversing/adapters.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/traversing/adapters.py:1.9	Sun Jun  1 11:59:37 2003
+++ Zope3/src/zope/app/traversing/adapters.py	Wed Jun  4 04:46:33 2003
@@ -29,6 +29,8 @@
 from zope.app.traversing.namespace import UnexpectedParameters
 from zope.app.traversing.namespace import parameterizedNameParse
 
+from zope.interface import implements
+
 from types import StringTypes
 
 __metaclass__ = type
@@ -37,7 +39,7 @@
 class DefaultTraversable:
     """Traverses objects via attribute and item lookup"""
 
-    __implements__ = ITraversable
+    implements(ITraversable)
 
     def __init__(self, subject):
         self._subject = subject
@@ -58,7 +60,7 @@
 
 class ObjectName(object):
 
-    __implements__ = IObjectName
+    implements(IObjectName)
 
     def __init__(self, context):
         self.context = context
@@ -76,7 +78,7 @@
 
 class SiteObjectName(object):
 
-    __implements__ = IObjectName
+    implements(IObjectName)
 
     def __init__(self, context):
         pass
@@ -89,7 +91,7 @@
 class WrapperPhysicallyLocatable:
     __doc__ = IPhysicallyLocatable.__doc__
 
-    __implements__ =  IPhysicallyLocatable
+    implements(IPhysicallyLocatable)
 
     def __init__(self, context):
         self.context = context
@@ -124,7 +126,7 @@
 class RootPhysicallyLocatable:
     __doc__ = IPhysicallyLocatable.__doc__
 
-    __implements__ =  IPhysicallyLocatable
+    implements(IPhysicallyLocatable)
 
     __used_for__ = IContainmentRoot
 
@@ -142,7 +144,7 @@
 class Traverser:
     """Provide traverse features"""
 
-    __implements__ = ITraverser
+    implements(ITraverser)
 
     # This adapter can be used for any object.
 
@@ -222,7 +224,7 @@
         if obj.__class__ == dict:
             # Special-case dicts
             return obj[name]
-        
+
         traversable = queryAdapter(obj, ITraversable, None)
         if traversable is None:
             raise NotFoundError('No traversable adapter found', obj)