[Zope3-checkins] CVS: Packages3/Interface - Implements.py:1.14

Gary Poster gary at zope.com
Wed Jan 21 10:40:35 EST 2004


Update of /cvs-repository/Packages3/Interface
In directory cvs.zope.org:/tmp/cvs-serv16851

Modified Files:
	Implements.py 
Log Message:
Revert change from yesterday: there is an interaction bug with ExtensionClass and the HEAD Zope 3 interface implementation so this isn't ready yet.  Will return to this code once the interaction problems have been ironed out.



=== Packages3/Interface/Implements.py 1.13 => 1.14 ===
--- Packages3/Interface/Implements.py:1.13	Tue Jan 20 12:30:46 2004
+++ Packages3/Interface/Implements.py	Wed Jan 21 10:40:29 2004
@@ -22,9 +22,8 @@
 from zope.interface import classImplements as assertTypeImplements
 from zope.interface import providedBy as objectImplements
 from zope.interface import implementedBy as instancesOfObjectImplements
-from zope.interface.declarations import Declaration
-from Interface.Exceptions import BadImplements
 
+from zope.interface.declarations import InterfaceSpecification
 def visitImplements(implements, object, visitor):
     """Call visitor for each interace.
 
@@ -33,12 +32,8 @@
     If the visitor returns anything true, the loop stops.
     This does not, and should not, visit superinterfaces.
     """
-    # used little, so not worrying too much about efficiency or cheesiness
-    try:
-        seq = Declaration(implements)
-    except TypeError:
-        raise BadImplements
-    for interface in seq:
+
+    for interface in InterfaceSpecification(implements):
         if visitor(interface):
             break
 




More information about the Zope3-Checkins mailing list