[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/ifacemodule -
browser.py:1.9
Jim Fulton
jim at zope.com
Sun Apr 11 14:16:19 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/apidoc/ifacemodule
In directory cvs.zope.org:/tmp/cvs-serv18950/src/zope/app/apidoc/ifacemodule
Modified Files:
browser.py
Log Message:
Renamed getUtilities to getUtilitiesFor to be consistent w utility
service.
Utility names are now unicode.
=== Zope3/src/zope/app/apidoc/ifacemodule/browser.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/apidoc/ifacemodule/browser.py:1.8 Wed Apr 7 22:12:25 2004
+++ Zope3/src/zope/app/apidoc/ifacemodule/browser.py Sun Apr 11 14:16:18 2004
@@ -435,14 +435,14 @@
>>> factories = [f for f in factories if f.sort() is None]
>>> factories.sort()
>>> factories
- [[('name', 'FooFactory'), ('title', 'Foo Factory')]]
+ [[('name', u'FooFactory'), ('title', 'Foo Factory')]]
"""
iface = removeAllProxies(self.context)
return [{'name': n, 'title': f.title} \
for n, f in zapi.getFactoriesFor(self.context, iface) \
if iface in tuple(f.getInterfaces())]
- def getUtilities(self):
+ def getUtilitiesFor(self):
"""Return all utilities that provide this interface.
Example::
@@ -451,12 +451,12 @@
>>> from tests import getInterfaceDetails
>>> details = getInterfaceDetails()
- >>> utils = details.getUtilities()
+ >>> utils = details.getUtilitiesFor()
>>> pprint(utils)
- [[('name', 'The Foo'),
+ [[('name', u'The Foo'),
('path', 'zope.app.apidoc.ifacemodule.tests.Foo'),
('url', 'zope/app/apidoc/ifacemodule/tests/Foo'),
- ('url_name', 'The Foo')]]
+ ('url_name', u'The Foo')]]
"""
service = zapi.getService(self.context, 'Utilities')
utils = service.getUtilitiesFor(removeAllProxies(self.context))
More information about the Zope3-Checkins
mailing list