[Zope3-checkins] CVS: Zope3/src/zope/app - zapi.py:1.10.2.2

Jim Fulton jim at zope.com
Wed Sep 10 19:08:48 EDT 2003


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

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

=== Zope3/src/zope/app/zapi.py 1.10.2.1 => 1.10.2.2 ===
--- Zope3/src/zope/app/zapi.py:1.10.2.1	Mon Sep  8 14:21:18 2003
+++ Zope3/src/zope/app/zapi.py	Wed Sep 10 18:08:17 2003
@@ -37,3 +37,15 @@
 
 name = getName
 
+
+from zope.app.interfaces.container import IAddTarget
+def add(container, name, object):
+    """Add an object to a container, using an adapter
+    """
+    return getAdapter(container, IAddTarget).addObject(name, object)
+
+from zope.app.interfaces.container import IRemoveSource
+def remove(container, name, object):
+    """Remove an object to a container, using an adapter
+    """
+    return getAdapter(container, IRemoveSource).removeObject(name)




More information about the Zope3-Checkins mailing list