[Zope-dev] Re: differences in PropertyManager._setPropValue

Florent Guillaume fg at nuxeo.com
Mon Oct 31 08:25:20 EST 2005


Victor Safronovich wrote:
>   I  have  a question about PropertyManager._setPropValue in 2.6 and its changed
>   version in 2.7-2.8.
> 
>   I found this revision
>   http://svn.zope.org/Zope/trunk/lib/python/OFS/PropertyManager.py?rev=24349&view=rev
> 
> Why   in   this   method added conversion to the tuple for all the lists? May be
> better check for 'lines','tokens' property type? I have a properties of type
> "list",  and i expect that getProperty returns the list type. This works in Zope
> 2.6, but broken in 2.7-2.8

This was changed because have mutable objects stored as properties can lead 
to unexpected behavior. Do you mean you have a custom proprty type called 
"list"? What's your use case for it, and why can't tuple fit the bill ?

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-Dev mailing list