[Python-bugs-list] [ python-Bugs-510388 ] Enhance xrange()
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 29 Jan 2002 14:19:03 -0800
Bugs item #510388, was opened at 2002-01-29 14:19
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=510388&group_id=5470
Category: Python Interpreter Core
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Raymond Hettinger (rhettinger)
Assigned to: Nobody/Anonymous (nobody)
Summary: Enhance xrange()
Initial Comment:
Make the STOP argument optional so that xrange can
produce an infinite series.
for i in xrange():
if test(i): break
print i, 'Failed test. Continuing search.'
Also, add two methods to xrange, .__iter__ and
.next() so that xrange can be used interchangably with
other generators.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=510388&group_id=5470