Andre Engels wrote:
On Tue, Oct 13, 2009 at 11:55 PM, Andre Engels <andreeng...@gmail.com> wrote:
for i in range(sys.maxint):
if i % 100 =0:
print i
Grmbl.... cut-and-paste error... I meant of course:
for i in xrange(sys.maxint):
if i % 100 =0:
print i
What version of Python gives an error on that code? My 2.6.2 works fine.
If you do need a larger xrange, you can easily write your own. Here's
one called brange(). It'd be a bit more work to make the 3-argument
version.
def brange(limit):
i = 0
while i < limit:
yield i
i += 1
--
http://mail.python.org/mailman/listinfo/python-list