Discussion:
[Modeling-users] Interfaces
Ernesto Revilla
2004-07-21 15:05:01 UTC
Permalink
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



---
avast! Antivirus: Saliente mensaje limpio.
Base de datos de Virus (VPS): 0430-1, 19/07/2004
Comprobado en: 21/07/2004 19:03:05
avast! tiene los derechos reservados (c) 2000-2004 ALWIL Software.
http://www.avast.com
Sebastien Bigaret
2004-07-21 15:46:00 UTC
Permalink
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.
Post by Ernesto Revilla
Dear Sébastien,
from Interface import 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
from Modeling.interfaces.Adaptor import IAdaptor
...
__implements__ = (IAdaptor,)
...
(Sounds very much like Twisted...)
Erny
Loading...