[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/PropertySets - PropertySetDef.py:1.1.2.3
Jim Fulton
jim@zope.com
Mon, 10 Jun 2002 15:34:51 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/PropertySets
In directory cvs.zope.org:/tmp/cvs-serv5490/lib/python/Zope/App/OFS/PropertySets
Modified Files:
Tag: Zope-3x-branch
PropertySetDef.py
Log Message:
Implemented
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/IContainerPythonification
Along the way:
- Converted most uses of has_key to use in.
- Fixed a bug in Interface names and namesAndDescriptions methods
that caused base class attributes to be missed.
=== Zope3/lib/python/Zope/App/OFS/PropertySets/PropertySetDef.py 1.1.2.2 => 1.1.2.3 ===
def has_field(self, name):
'''See interface IPropertySetDef'''
- return self.fields.has_key(name)
+ return name in self.fields
def addField(self, name, field):
'''See interface IPropertySetDef'''
- if self.fields.has_key(name): raise DuplicationError(name)
+ if name in self.fields:
+ raise DuplicationError(name)
self.fields[name] = field
self.namelist.append(name)