[Zope3-dev] Need help with jargon

Jim Fulton jim at zope.com
Thu Apr 1 10:47:19 EST 2004


We have two kinds of adapters.

The first kind of adapter has semantics described by PEP 246.
These adapters have the following properties:

- A single object is adapted to an interface (or, more generally,
   a protocol).

- The adapted object may be it's own adapter. If the object already
   provides the protocol, then the object itself may be returned.

- The object can exert some control over adaptation by providing
   a __conform__ method.

Note that the first kind of adapter will almost always be obtained
through interface call.

The second kind of adapter:

- Adapts any number of objects (0 or more)

- Is named. It adapts to an interface qualified by a name,
   which defaults to ''

- Does not consider whether any of the adapted objects
   already provide the desired interface and does not look
   for a __conform__ method on any of the adapted objects.

We need names for these.  These names should probably be reflected
in the api.

Suggestions?

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org




More information about the Zope3-dev mailing list