[Zope3-dev] tagged value handling inconsequent for interface methods and attributes and interfaces themself

Jim Fulton jim at zope.com
Wed Oct 19 09:46:42 EDT 2005


Stephan Richter wrote:
> On Wednesday 19 October 2005 05:51, Grégoire Weber wrote:
> 
>>Hi everybody,
>>
>>while modeling the external API of an application I'd like to use the
>>tagged value feature of the interface implementation.
>>
>>It seems to me that handling tagged values is implemented inconsequently.
>>
>>It would be nice if tagging attributes and interfaces would look the
>>same as tagging methods:
> 
> 
> I agree. Note that there is also a zope-interface mailing list.
> 
> 
>>in the interface definition:
>>
>>    meth.tag = 'tagged' # interrestingly ``meth.setTaggedValue`` doesn't
>>work attr.tag = 'tagged' # have to use ``attr.setTaggedValue('tag',
>>'tagged')`` currently
> 
> 
> I think that setTaggedValue() should be the only thing that works, ever.
> 
> 
>>on module level:
>>
>>    IGaga.tag = 'tagged' # have to use ``IGaga.setTaggedValue('tag',
>>'tagged')`` currently
> 
> 
> This should definitely fail, using setTaggedValue() is again the right choice.
> 
> 
>>See code below with traces.
>>
>>I didn't dig deep enough into the interface implementation to find out
>>why. I may try. Any hints?
> 
> 
> I think you should have no problems finding support for this fix, so please 
> feel free to fix it.

+1 on all above. :)

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list