[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container - IContainer.py:1.1.2.8

Jim Fulton jim@zope.com
Sat, 8 Jun 2002 13:26:16 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container
In directory cvs.zope.org:/tmp/cvs-serv5145

Modified Files:
      Tag: Zope-3x-branch
	IContainer.py 
Log Message:
Undid part of last checkin that split getObject into getObject and
queryObject. This was premature given other plans.


=== Zope3/lib/python/Zope/App/OFS/Container/IContainer.py 1.1.2.7 => 1.1.2.8 ===
 
 
+_RAISE_KEYERROR = []
+
 
 class IReadContainer(Interface):
     """Readable content containers
@@ -56,19 +58,14 @@
 
            """
 
-    def getObject(name):
-        """Return the named object.
-        
-           If the named object is not found, KeyError is raised.
-
-           """
+    def getObject(name, default=_RAISE_KEYERROR):
+        """Return the named object
 
-    def queryObject(name, default=None):
-        """Return the named object.
-        
-           If the named object is not found, the default is returned
+        Return the named object, or the value of the default argument
+        if given and the named object is not found. If no default is
+        given and the object is not found a KeyError is raised.
 
-           """
+        """
 
     def hasObject(name):
         """Return true if the named object appears in the container."""