[Zodb-checkins] CVS: StandaloneZODB/ZODB - PersistentMapping.py:1.19

Guido van Rossum guido@python.org
Tue, 12 Feb 2002 17:33:39 -0500


Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv13020/ZODB

Modified Files:
	PersistentMapping.py 
Log Message:
More changes merging the StandaloneZODB-1.0 release branch into the
trunk.  I'm *almost* done with the merge; the only file not yet merged
is FileStorage.py.



=== StandaloneZODB/ZODB/PersistentMapping.py 1.18 => 1.19 ===
     __super_update = UserDict.update
     __super_setdefault = UserDict.setdefault
-    __super_popitem = UserDict.popitem
 
     def __delitem__(self, key):
         self.__super_delitem(key)
@@ -69,9 +68,14 @@
             self._p_changed = 1
         return self.__super_setdefault(key, failobj)
 
-    def popitem(self):
-        self._p_changed = 1
-        return self.__super_popitem()
+    try:
+        __super_popitem = UserDict.popitem
+    except AttributeError:
+        pass
+    else:
+        def popitem(self):
+            self._p_changed = 1
+            return self.__super_popitem()
 
     # If the internal representation of PersistentMapping changes,
     # it causes compatibility problems for pickles generated by