[Checkins] SVN: zc.dict/branches/tlotze-blist/src/zc/dict/dict.py when updating a dict's order, don't replace the order BList but only its content

Thomas Lotze tl at gocept.com
Tue Dec 23 09:31:26 EST 2008


Log message for revision 94285:
  when updating a dict's order, don't replace the order BList but only its content

Changed:
  U   zc.dict/branches/tlotze-blist/src/zc/dict/dict.py

-=-
Modified: zc.dict/branches/tlotze-blist/src/zc/dict/dict.py
===================================================================
--- zc.dict/branches/tlotze-blist/src/zc/dict/dict.py	2008-12-23 14:02:50 UTC (rev 94284)
+++ zc.dict/branches/tlotze-blist/src/zc/dict/dict.py	2008-12-23 14:31:25 UTC (rev 94285)
@@ -160,7 +160,7 @@
         self._data[key] = value
 
     def updateOrder(self, order):
-        order = zc.blist.BList(order)
+        order = list(order)
 
         if len(order) != len(self._order):
             raise ValueError("Incompatible key set.")
@@ -173,7 +173,7 @@
         if order_set.difference(self._order):
             raise ValueError("Incompatible key set.")
 
-        self._order = order
+        self._order[:] = order
 
     def clear(self):
         super(OrderedDict, self).clear()



More information about the Checkins mailing list