[Zope3-checkins] CVS: Zope3/src/zope/app/component - classfactory.py:1.3.4.2 contentdirective.py:1.1.4.2 globalinterfaceservice.py:1.10.2.2 hooks.py:1.5.10.2 interfacefield.py:1.8.2.2 nextservice.py:1.3.18.2
Albertas Agejevas
alga@codeworks.lt
Mon, 23 Jun 2003 10:20:54 -0400
Update of /cvs-repository/Zope3/src/zope/app/component
In directory cvs.zope.org:/tmp/cvs-serv16963/src/zope/app/component
Modified Files:
Tag: cw-mail-branch
classfactory.py contentdirective.py globalinterfaceservice.py
hooks.py interfacefield.py nextservice.py
Log Message:
One more sync with HEAD.
=== Zope3/src/zope/app/component/classfactory.py 1.3.4.1 => 1.3.4.2 ===
=== Zope3/src/zope/app/component/contentdirective.py 1.1.4.1 => 1.1.4.2 ===
=== Zope3/src/zope/app/component/globalinterfaceservice.py 1.10.2.1 => 1.10.2.2 ===
--- Zope3/src/zope/app/component/globalinterfaceservice.py:1.10.2.1 Sun Jun 22 10:22:54 2003
+++ Zope3/src/zope/app/component/globalinterfaceservice.py Mon Jun 23 10:19:53 2003
@@ -14,6 +14,7 @@
"""
$Id$
"""
+from __future__ import generators
__metaclass__ = type
@@ -41,30 +42,23 @@
else:
return default
- def searchInterfaceIds(self, search_string='', base=None):
- result = []
-
- data = self.__data
- search_string = search_string.lower()
-
- for id in data:
- interface, doc = data[id]
-
+ def searchInterface(self, search_string=None, base=None):
+ return [t[1] for t in self.items(search_string, base)]
+
+ def searchInterfaceIds(self, search_string=None, base=None):
+ return [t[0] for t in self.items(search_string, base)]
+
+ def items(self, search_string=None, base=None):
+ if search_string:
+ search_string = search_string.lower()
+
+ for id, (interface, doc) in self.__data.items():
if search_string:
if doc.find(search_string) < 0:
continue
-
if base is not None and not interface.extends(base, 0):
continue
-
- result.append(id)
-
- return result
-
- def searchInterface(self, search_string='', base=None):
- data = self.__data
- return [data[id][0]
- for id in self.searchInterfaceIds(search_string, base)]
+ yield id, interface
def _getAllDocs(self,interface):
docs = [str(interface.__name__).lower(),
=== Zope3/src/zope/app/component/hooks.py 1.5.10.1 => 1.5.10.2 ===
=== Zope3/src/zope/app/component/interfacefield.py 1.8.2.1 => 1.8.2.2 ===
=== Zope3/src/zope/app/component/nextservice.py 1.3.18.1 => 1.3.18.2 ===