On Monday 29 May 2006 06:56, Frank Burkhardt wrote:
> Unfortunately, there is no 'provide' method on interfaces :-( .
> Now the questions:
> 1. Is the list of a content object's provided interfaces stored
> persistently in the Zodb?


> 2. Is it according to Zope-, Python-, ... philosophy ok to danymically
> implement interfaces depending on the inner state of an object?


> 3. How do I manually make objects provide or "unprovide" given interfaces?

zope.interface.directlyProvides(obj, ifaces) *overrides all* directly provided 
interfaces. For simply adding a a directly provided interface without 
deleting any others use zope.interface.alsoProvides(obj, ifaces). A good 
usage example is setting the skin on a request.

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list

Reply via email to