[Checkins] SVN: zc.queue/trunk/ Fixed programming error that would prevent slicing of composite queues.

Malthe Borch cvs-admin at zope.org
Mon Jun 25 09:16:28 UTC 2012


Log message for revision 127067:
  Fixed programming error that would prevent slicing of composite queues.

Changed:
  U   zc.queue/trunk/CHANGES.txt
  U   zc.queue/trunk/src/zc/queue/_queue.py

-=-
Modified: zc.queue/trunk/CHANGES.txt
===================================================================
--- zc.queue/trunk/CHANGES.txt	2012-06-25 08:30:05 UTC (rev 127066)
+++ zc.queue/trunk/CHANGES.txt	2012-06-25 09:16:24 UTC (rev 127067)
@@ -5,7 +5,9 @@
 1.4 (unreleased)
 ================
 
--- Nothing yet
+- Fixed an issue where slicing a composite queue would fail due to a
+  programming error.
+  [malthe]
 
 
 1.3 (2012-01-11)

Modified: zc.queue/trunk/src/zc/queue/_queue.py
===================================================================
--- zc.queue/trunk/src/zc/queue/_queue.py	2012-06-25 08:30:05 UTC (rev 127066)
+++ zc.queue/trunk/src/zc/queue/_queue.py	2012-06-25 09:16:24 UTC (rev 127067)
@@ -224,7 +224,7 @@
 
     def __getitem__(self, index):
         if isinstance(index, slice):
-            start, stop, stride = slice.indices(len(self))
+            start, stop, stride = index.indices(len(self))
             res = []
             stride_ct = 1
             for ix, v in enumerate(self):



More information about the checkins mailing list