Just for the notes:

I first favoured something like this:

class IFoo(zope.interface.Interface):
    attr = zope.interface.Attribute('doc string')
    attr.someVariable = value

but this can't work if ``attr`` is defined in ``IBar`` and setting a
tagged value is done in ``IFoo`` (which is inheriting from ``IBar``)
like this:

class IBar(zope.interface.Interface):
    attr = zope.interface.Attribute('doc string')

class IFoo(IBar):
    attr.someVariable = value  # NameError


2005/10/24, Stephan Richter <[EMAIL PROTECTED]>:
> class IFoo(zope.interface.Interface):
>
>   attr = zope.interface.Attribute('doc string')
>   ITaggedValues(attr).someVariable = value
>
> Any comments before I spend time writing this up?

The drawback*) of this is that the adapter registry has to be in place.

*) Mostly a drawback if you only use ``zope.interface``

Gregoire
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to