[Zope-Checkins] PropertySet/PropertySetDef obsolete

R. David Murray bitz@bitdance.com
Wed, 17 Jul 2002 11:18:25 -0400 (EDT)


On Tue, 16 Jul 2002 zope-checkins-request@zope.org wrote:
> From: Jeremy Hylton <jeremy@zope.com>
> Subject: [Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/PropertySets/tests - PropertySet.py:1.3
[...]
> Log Message:
> Fix SyntaxError
>
> XXX Why wasn't this syntax error caught?  If this code isn't used by
> anything, perhaps it should be removed.

Yep, it should be.  (See below).

> Subject: [Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/PropertySets - PropertySetDef.py:1.3
[...]
> Log Message:
> Simplify the implementation of PropertySetDef.
>
> The namelist attribute was redundant, since the fields dict had the
> same information as its keys.  The __iter__() can be implemented more
> efficiently by return the dict's values iterator.

What you didn't know, because I failed to put it in the Interface
and the test for it was insufficient, is that the *order* of the
fields in a PropertySetDef is important.  So you simplified away
function that you didn't know was important <grin>.

But it doesn't matter, because PropertySetDefs are being replaced
by Schemas, so the whole PropertySetDef thing can be deleted.
PropertySets may still need to be implemented, but as you noticed
above that hadn't actually been done yet.  So when I or someone
else gets back to this the whole thing should be redone from
scratch anyway.

--RDM