Interface support in Python? (was Re: [Zope3-dev] Proposal: Improving on __implements__)

Barry A. Warsaw barry@zope.com
Wed, 22 Jan 2003 14:40:11 -0500


>>>>> "JF" == Jim Fulton <jim@zope.com> writes:

    JF> I like Steve's proposal quite a bit.  I've made some minor
    JF> comments on it.

Me too.

    JF> A while ago, Mike Pelletier, proposed syntax changes to Python
    JF> to support interfaces.  At the time, I thought Mike's proposal
    JF> was premature. Since then, we've had a lot more experience
    JF> using interfaces and I no longer feel Mike's proposal (or
    JF> something like it) is premature.  There have been a number of
    JF> related proposals on Python-Dev.

    JF> I think now would be a good time to make a new Python
    JF> interfaces PEP. Such a PEP should probably be a combination
    JF> interface and adapter PEP.  I'd be willing to work on this,
    JF> but not alone.  Are other folks intereseted in working on
    JF> this?

    JF> If we don't make a PEP, then I'm inclined to behave as if we
    JF> never will. Not that this is the last chance, but I don't want
    JF> to be encumbered by something that may never happen. If it
    JF> does happen, I'd be happy to deal with some refactoring
    JF> then. :)

There's a middle ground that should be done now, or in parallel with a
new PEP.  We should create a separate distutils package that other
Python projects can use outside of Zope.  That would give us a
base-line implementation to refer to in the PEP and it would give
working code for folks to play with, or incorporate.

I'd also really like to see interfaces make it into Python, and would
be willing to help out with the PEP.

-Barry