Re: Interfaces

Sebastien Bigaret <[email protected]> 21 Jul 2004 19:44:16 +0200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
This initially came from zope (not z3 but some good old z2). When I
began coding the framework, I used interfaces as a guideline for
forthcoming implementations. I also used zope's Interface class to make
some verifications --there's an example of this in KeyValueCoding, look
at the end:

  try:
    verify_class_implementation(KeyValueCodingInterface, KeyValueCoding)
  except:
    pass


Now back to z3 and twisted, I wish I had the time to discover those
masterpieces, but unfortunately that's not (still!) the case...  BTW if
any of you have (even little) experiences w/ MDL and z3 or twisted, I'm
very interested in hearing your stories!

-- Sébastien.


Ernesto Revilla <[email protected]> wrote:
> Dear Sébastien,
> 
> in the interface files, there is a:
> 
> try:
>   from Interface import Base
> except:
>   class Base:
>     pass
> 
> I can't any Interface.py.   I know Twisted and Zope z3 components have some
> interfaces. Is this aimed at one of these or your own stuff? In the
> implementations we have something like:
> 
> from Modeling.interfaces.Adaptor import IAdaptor
> ...
> class Adaptor:
>      __implements__ = (IAdaptor,)
> ...
> 
> (Sounds very much like Twisted...)
> 
> 
> Erny



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click