[Python-3000] ABC's, Roles, etc

Phillip J. Eby pje at telecommunity.com
Thu May 10 17:23:00 CEST 2007


At 12:08 AM 5/11/2007 +1000, Nick Coghlan wrote:
>Benji York wrote:
> > If the PEP cooperates as well with zope.interface as you suggest, all
> > will be good in the world.  Personally I'd prefer sufficient hooks be
> > added to the language and these types of things (interfaces, adaptation,
> > generic functions, etc.) be left to third parties (like yourself)
> > instead of being canonicalized unnecessarily.
>
>My understanding of PJE's PEP is that adding those hooks you mention is
>essentially what it is about :)

Yes, exactly -- plus a handful of useful default implementations that 
cover the most common use cases.

However, because the hooks themselves are implemented using those 
default implementations, we can't separate out the implementations 
and just leave the hooks!  There has to be *some* implementation of 
generic functions, method combination, interfaces, adaptation, and 
aspects, in order to implement the very hooks by which any 
replacement implementations would be installed.  It would be like 
trying to provide the idea of metaclasses without having the "type" 
type implemented.

That being the case, one might as well expose the basic functionality 
for people to use, until/unless their needs require an extended implementation.



More information about the Python-3000 mailing list