[Interface-dev] [Fwd: Re: Interfaces status and coordination]
Jim Fulton
jim at zope.com
Tue Jun 1 06:20:36 EDT 2004
Itamar Shtull-Trauring wrote:
> In addition to Glyph's question, other random notes -
>
> 1. Are the main APIs stable now that zope3 has hit alpha?
Yes. Note that I finally remove zope.interface.type. :)
> If the answer is yes I'm switching Twisted to zope.interface this or
> next week in subversion.
Cool.
> 2. I got another use case for tuple-adaptation (serialization adapter
> for Twisted's RMI protocol), so I'd like to reiterate my request not to
> use IFoo((a, b)) to mean something special.
OK, I noted your request the first time. :)
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Interfaces status and coordination
> From:
> Glyph Lefkowitz <glyph at twistedmatrix.com>
> Date:
> Mon, 31 May 2004 18:07:31 -0400
> To:
> Itamar Shtull-Trauring <itamar at itamarst.org>
>
>
> This is a minor feature request, but as I mentioned in
> http://www.livejournal.com/users/glyf/16231.html?thread=17767#t17767
>
> There's no way to get from a method description to the interface it's
> described in.
>
>
> from zope import interface as zi
>
> class IG(zi.Interface):
>
> def h(i):
> '''stuff'''
>
> print repr(IG['h'].interface)
>
> As you can see, the 'interface' attribute is a string, so you can't use
> it to get back to the actual interface. Can it be made into an actual
> interface object?
Off hand, I can't think of any reason not to do this. I won't be able to
do this before the Zope X3.0 beta, but I can do it on the head later, or someone
else can do this.
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 Interface-dev
mailing list