Skip to content

Commit

Permalink
- Collector #2438: Using a slice operation like [30:] on a
Browse files Browse the repository at this point in the history
          ZCatalog search result caused a MemoryError because
          the __getslice__ implementation used  range() instead
          of xrange().
  • Loading branch information
zopyx committed Jul 24, 2001
1 parent 7227d74 commit 43a05bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lazy.py
Expand Up @@ -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:
Expand Down Expand Up @@ -137,7 +137,7 @@ def __add__(self, other):

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
Expand Down

0 comments on commit 43a05bf

Please sign in to comment.