[Checkins] SVN: zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interface documented the expectation that interfaces get patched by other packages
Thomas Lotze
tl at gocept.com
Thu Dec 17 09:11:39 EST 2009
Log message for revision 106702:
documented the expectation that interfaces get patched by other packages
Changed:
U zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interface.py
U zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interfaces.py
-=-
Modified: zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interface.py
===================================================================
--- zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interface.py 2009-12-17 14:10:40 UTC (rev 106701)
+++ zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interface.py 2009-12-17 14:11:39 UTC (rev 106702)
@@ -426,8 +426,15 @@
return attr
class InterfaceClass(Element, InterfaceBase, Specification):
- """Prototype (scarecrow) Interfaces Implementation."""
+ """Prototype (scarecrow) Interfaces Implementation.
+ Note that code outside zope.interface may add methods to interfaces in
+ order to provide easy access to functionality that uses interfaces. One
+ example of this is zope.component which adds the `adapt` and `utility`
+ methods.
+
+ """
+
# We can't say this yet because we don't have enough
# infrastructure in place.
#
Modified: zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interfaces.py
===================================================================
--- zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interfaces.py 2009-12-17 14:10:40 UTC (rev 106701)
+++ zope.interface/branches/tlotze-patching-interfaces/src/zope/interface/interfaces.py 2009-12-17 14:11:39 UTC (rev 106702)
@@ -198,7 +198,7 @@
def meth2():
'''Documentation for meth2'''
- You use interfaces in two ways:
+ You use interfaces in at least two ways:
o You assert that your object implement the interfaces.
@@ -226,6 +226,15 @@
o You query interface meta-data. See the IInterface methods and
attributes for details.
+ In addition, packages other than zope.interface may implement different
+ uses of interfaces. In particular, they may add new methods to interfaces
+ that allow easy access to their functionality.
+
+ As an example, zope.component implements the Zope Component Architecture
+ which is about registering and looking up adapters and utilities by the
+ interface they provide. It adds two methods named `adapt` and `utility` to
+ interfaces.
+
"""
def providedBy(object):
More information about the checkins
mailing list