but we recommend you switch to 'adapt()', which will work with both PEAK |
but we recommend you switch to 'adapt()', which will work with both PEAK |
and Zope interfaces. |
and Zope interfaces. |
|
|
- Replaced all use of 'zope.interface' with 'peak.interface' because |
- Replaced all use of 'zope.interface' with 'protocols' package because |
the new 'peak.interface': |
the 'protocols' package: |
|
|
* is considerably smaller and simpler than 'zope.interface' |
* is considerably smaller and simpler than 'zope.interface' |
|
|
adapts from A to B, and adapter BC adapts from B to C, then an adapt(x,C) |
adapts from A to B, and adapter BC adapts from B to C, then an adapt(x,C) |
where 'x' is an 'A', will be implemented as BC(AB(x)). |
where 'x' is an 'A', will be implemented as BC(AB(x)). |
|
|
|
* Supports "open protocols" that allow you to "superclass" a protocol |
|
to create a subset protocol; objects that support the first protocol |
|
will automatically support the subset protocol. For example, if one |
|
person defines a "dictionary" protocol, someone else can create a |
|
"read-only dictionary" protocol, and all objects supporting the |
|
"dictionary protocol" will be considered to implement the "read-only |
|
dictionary" protocol. |
|
|
* can interoperate with other interface packages, including Zope's, but |
* can interoperate with other interface packages, including Zope's, but |
does not require them |
does not require them |
|
|
* works with module inheritance (for everything but moduleProvides()) |
* works with module inheritance (for everything but moduleProvides(), and |
|
we should get to that by 0.5a2) |
|
|
* lets you use Interfaces as abstract base classes (i.e., you can |
* lets you use Interfaces as abstract base classes (i.e., you can |
inherit from an interface and turn it into an implementation, and |
inherit from an interface and turn it into an implementation, and |