I'm going to write an alternative implementation of
zope.app.file.interfaces.IFile . This implementation will automatically
determine the mime type of the data it's containing.
I would like to add a method that determines (guesses), if the current file
object contains an image...
isimage=(mimetype(self.data).split('/') == 'image')
... and I want to dynamically make the object implement another interface ...
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?
Zope3-users mailing list