[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher - BaseRequest.py:1.1.2.30 RequestDataProperty.py:1.1.4.5
Jim Fulton
jim@zope.com
Mon, 10 Jun 2002 15:34:56 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher
In directory cvs.zope.org:/tmp/cvs-serv5490/lib/python/Zope/Publisher
Modified Files:
Tag: Zope-3x-branch
BaseRequest.py RequestDataProperty.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/Publisher/BaseRequest.py 1.1.2.29 => 1.1.2.30 ===
return default
- def has_key(self, key):
+ def __contains__(self, key):
'See Interface.Common.Mapping.IReadMapping'
lookup = self.get(key, self)
return lookup is not self
+
+ has_key = __contains__
#
############################################################
=== Zope3/lib/python/Zope/Publisher/RequestDataProperty.py 1.1.4.4 => 1.1.4.5 ===
return self.__get(name, default)
- def has_key(self, key):
+ def __contains__(self, key):
lookup = self.get(key, self)
return lookup is not self
-
+
+ has_key = __contains__
class RequestDataMapper(object):
@@ -50,9 +51,11 @@
def get(self, name, default=None):
return self.__map.get(name, default)
- def has_key(self, key):
+ def __contains__(self, key):
lookup = self.get(key, self)
return lookup is not self
+
+ has_key = __contains__
def keys(self): return self.__map.keys()
def items(self): return self.__map.items()