I'm was curious and try to dig into..
In zope.interfaces.declarations.py __providedBy__ is an instance of
objectSpecificationDescriptor implemented in C
and there is one Python version too in ObjectSpecificationDescriptorPy.
It's a descriptor that try to acess __provides__ of instance and class
Maybe the question could be: Is possible change the class used as an
__providedBy__ and it will use an alternative way to return the
interfaces dinamically provided and mantain the original semantic?
On Thu, Feb 14, 2008 at 8:22 PM, Martin Aspeli <[EMAIL PROTECTED]> wrote:
> I may have a use case where I need an instance to provide marker
> interfaces dynamically. That is, under certain conditions I want the
> type to say it provides a particular marker interface, and otherwise it
> doesn't. It still needs to support the usual by-class and
> directly-provided idioms for providing interfaces, including
> Is such a thing possible? Perhaps one could make __providedBy__ a
> dynamic property or something? Or is this a very bad idea? :)
> Author of `Professional Plone Development`, a book for developers who
> want to work with Plone. See http://martinaspeli.net/plone-book
> Zope3-users mailing list
Rudá Porto Filgueiras
Hospedagem Plone, Zope e Python?
Zope3-users mailing list