[Python-3000] ABC's, Roles, etc
Benji York
benji at benjiyork.com
Thu May 10 00:11:36 CEST 2007
Phillip J. Eby wrote:
> If you don't count in-house "enterprise" operations and shops like
> Google, Yahoo, et al., the development of Zope is certainly one of
> the largest (if not the very largest) Python project. It's
> understandable that LBYL is desirable in that environment. On the
> other hand, such large projects in Python are pretty darn rare.
By way of clarification: Even in the large Zope 3 projects I work on
(which obviously use zope.interface), we virtually never use interfaces
for LBYL (just as Zope 3 itself rarely does).
Instead, we either assume something implements a (little "i") interface
and act as such (never invoking the interface machinery, the way most
people write Python), or we use adaptation to ask for something that
implements a particular (big "I") Interface (but even there no
verification is done).
My point is, people generally use zope.interface Interfaces as
documentation and names for particular behavior/API, not as an LBYL
enforcement mechanism.
--
Benji York
http://benjiyork.com
More information about the Python-3000
mailing list