Commit 395668f7 authored by Nikolay Kim's avatar Nikolay Kim

It's not possible to use xrange inside __getslice__ in 64bit python on

Windows, because xrange uses 32bit integers and __getslice__ gets 64bit integers
parent 01d1b9be
......@@ -13,6 +13,9 @@ Bugs Fixed
- Fixed unit test that failed on fast Windows machines.
- Fixed OverflowError in Products.ZCatalog.Lazy on 64bit python
on Windows.
- LP #642728: Fixed TypeError on nested multi part messages in MailHost.
Features Added
......
......@@ -13,6 +13,8 @@
__doc__='''$Id$'''
__version__='$Revision: 1.9 $'[11:-2]
from itertools import islice, count
class Lazy:
......@@ -44,7 +46,7 @@ class Lazy:
def __getslice__(self,i1,i2):
r=[]
for i in xrange(i1,i2):
for i in islice(count(i1), i2-i1):
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