[Zope3-checkins] CVS: Zope3/src/zope/app/content -
folder.py:1.15.2.5
Jim Fulton
jim at zope.com
Mon Sep 15 14:13:01 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/content
In directory cvs.zope.org:/tmp/cvs-serv15511/src/zope/app/content
Modified Files:
Tag: parentgeddon-branch
folder.py
Log Message:
Got lots of tests to pass.
Added a setitem helper function to be used to help satisfy container
contracts.
=== Zope3/src/zope/app/content/folder.py 1.15.2.4 => 1.15.2.5 ===
--- Zope3/src/zope/app/content/folder.py:1.15.2.4 Fri Sep 12 17:22:35 2003
+++ Zope3/src/zope/app/content/folder.py Mon Sep 15 14:12:31 2003
@@ -20,7 +20,7 @@
from zope.app.services.servicecontainer import ServiceManagerContainer
from zope.exceptions import DuplicationError
from zope.interface import implements, directlyProvides
-from zope.app.container.contained import Contained, contained, uncontained
+from zope.app.container.contained import Contained, setitem, uncontained
class Folder(Persistent, ServiceManagerContainer, Contained):
"""The standard Zope Folder implementation."""
@@ -91,13 +91,12 @@
if name in self.data:
raise DuplicationError("name, %s, is already in use" % name)
- self.data[name] = contained(object, self, name)
- return name
+ setitem(self, self.data.__setitem__, name, object)
def __delitem__(self, name):
"""Delete the named object from the folder. Raises a KeyError
if the object is not found."""
- uncontained(self.data[name], self)
+ uncontained(self.data[name], self, name)
del self.data[name]
RootFolder = Folder
More information about the Zope3-Checkins
mailing list