[Zope3-checkins] CVS: Zope3/src/zope/interface - type.py:1.6 interfaces.py:1.7

Steve Alexander steve@cat-box.net
Fri, 31 Jan 2003 11:22:35 -0500


Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv11586

Modified Files:
	type.py interfaces.py 
Log Message:
added __len__ method to the type registry


=== Zope3/src/zope/interface/type.py 1.5 => 1.6 ===
--- Zope3/src/zope/interface/type.py:1.5	Thu Jan 30 08:38:41 2003
+++ Zope3/src/zope/interface/type.py	Fri Jan 31 11:22:01 2003
@@ -101,3 +101,5 @@
                 result.append(k)
         return result
 
+    def __len__(self):
+        return len(self._reg)


=== Zope3/src/zope/interface/interfaces.py 1.6 => 1.7 ===
--- Zope3/src/zope/interface/interfaces.py:1.6	Thu Jan 30 08:38:41 2003
+++ Zope3/src/zope/interface/interfaces.py	Fri Jan 31 11:22:01 2003
@@ -296,6 +296,10 @@
         or are equal to the given interface.
         """
 
+    def __len__():
+        """Returns the number of distinct interfaces registered.
+        """
+
 class IAdapterRegistry(Interface):
     """Adapter-style registry