[Zope3-checkins] CVS: Zope3/src/zope/app/container - add.py:1.1.2.5 remove.py:1.1.2.2

Jim Fulton jim at zope.com
Tue Sep 9 16:22:56 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/container
In directory cvs.zope.org:/tmp/cvs-serv17585/src/zope/app/container

Modified Files:
      Tag: parentgeddon-branch
	add.py remove.py 
Log Message:
got more tests to pass on branch

=== Zope3/src/zope/app/container/add.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zope/app/container/add.py:1.1.2.4	Tue Sep  9 14:08:18 2003
+++ Zope3/src/zope/app/container/add.py	Tue Sep  9 15:22:25 2003
@@ -204,4 +204,12 @@
         return name
 
 def add(container, name, object):
+    """Add an object to a container
+
+    This is a helper function making it slightly easier to call the
+    AddTarget adapter. This should only be used from tests. Non-test
+    code should look up the adapter, as applications might override
+    it. 
+
+    """
     return AddTarget(container).addObject(name, object)


=== Zope3/src/zope/app/container/remove.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/container/remove.py:1.1.2.1	Mon Sep  8 14:21:19 2003
+++ Zope3/src/zope/app/container/remove.py	Tue Sep  9 15:22:25 2003
@@ -110,3 +110,15 @@
         publish(container, objectevent.ObjectModifiedEvent(container))
         
         return object
+
+
+def remove(container, name):
+    """Remove an object from a container
+
+    This is a helper function making it slightly easier to call the
+    RemoveSource adapter. This should only be used from tests. Non-test
+    code should look up the adapter, as applications might override
+    it. 
+
+    """
+    return RemoveSource(container).removeObject(name)




More information about the Zope3-Checkins mailing list