Commit f56e7a49 authored by Andreas Jung's avatar Andreas Jung

- Collector #2438: Using a slice operation like [30:] on a

          ZCatalog search result caused a MemoryError because
          the __getslice__ implementation used  range() instead
          of xrange().
parent 255d1174
......@@ -19,6 +19,11 @@ Zope Changes
properly. Also <dtml-var stxdoc ftm=structured-text> will no longer
produce <html>..<body> and </body>..</html>
- Collector #2438: Using a slice operation like [30:] on a
ZCatalog search result caused a MemoryError because
the __getslice__ implementation used range() instead
of xrange().
Zope 2.4 beta 2
......
......@@ -82,8 +82,8 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
__doc__='''$Id: Lazy.py,v 1.4 2001/03/15 13:16:23 jim Exp $'''
__version__='$Revision: 1.4 $'[11:-2]
__doc__='''$Id: Lazy.py,v 1.5 2001/07/24 20:46:27 andreasjung Exp $'''
__version__='$Revision: 1.5 $'[11:-2]
class Lazy:
......@@ -137,7 +137,7 @@ class Lazy:
def __getslice__(self,i1,i2):
r=[]
for i in range(i1,i2):
for i in xrange(i1,i2):
try: r.append(self[i])
except IndexError: return r
return r
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment