[Zope3-checkins] CVS: Zope3/src/zope/app/services - folder.py:1.13.6.4

Fred L. Drake, Jr. fred at zope.com
Fri Sep 12 16:03:07 EDT 2003


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

Modified Files:
      Tag: parentgeddon-branch
	folder.py 
Log Message:
work around ugly Python 2.2.x/2.3 bug:  __setitem__ on a super object
doesn't get handled properly, so we have to name __setitem__
explicitly


=== Zope3/src/zope/app/services/folder.py 1.13.6.3 => 1.13.6.4 ===
--- Zope3/src/zope/app/services/folder.py:1.13.6.3	Fri Sep 12 15:15:33 2003
+++ Zope3/src/zope/app/services/folder.py	Fri Sep 12 16:03:06 2003
@@ -75,8 +75,12 @@
         # Disallow the name "Packages"
         if name == "Packages":
             raise ValueError("Packages is not a valid package name")
-                
-        super(SiteManagementFolders, self)[name] = obj
+
+        # XXX We want to do super(...)[name] = obj, but the setitem
+        # slot doesn't get handled properly in Python 2.2.x and 2.3.  ;-(
+        #super(SiteManagementFolders, self)[name] = obj
+        # We can name __setitem__ explicitly, though:
+        super(SiteManagementFolders, self).__setitem__(name, obj)
 
         # We want out items to be virtually contained in our container
         # We have to do this after calling the superclass __setitem__




More information about the Zope3-Checkins mailing list