This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: xrange that supports longs, etc
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: nnorwitz
Priority: normal Keywords: patch

Created on 2006-08-24 16:20 by nnorwitz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
new-xrange.diff nnorwitz, 2006-08-24 16:20 C interp changes
xrange.py nnorwitz, 2006-08-24 16:21 Py xrange impl
xrange2.diff nnorwitz, 2006-08-25 01:03 diff all-in-one v1
Messages (2)
msg50984 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-08-24 16:20
This patch is not ready for prime-time.  It has various
crap in it that needs to be cleaned up.  I just wanted
to put the current state up so we don't lose it.  Once
we decide on the direction this should take for 2.6 and
3k, I can finish off the patch.

There is the change to rangeobject.c which contains the
bulk of the changes.  The bltinmodule.c change is only
to support exporting the xrange iter to the python
version of xrange.

I've attached the xrange impl I've been playing with
too.  It may require some tweaks when you make little
changes.
msg50985 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-08-25 01:03
Logged In: YES 
user_id=33168

I've attached a new version.  This has all the bootstrapping
necessary to import xrange and set it up properly.

The C code is still a bit sloppy.  The python version (which
is the only one used except for the xrange iterator over C
longs), is pretty clean and should work on the entire test
suite.

The python version has some additional features, at least
supporting negative indices.  It also warns on floats, not
sure if the C version does that or not.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43891
2008-01-06 22:29:46adminsetkeywords: - py3k
versions: + Python 3.0
2006-08-24 16:20:53nnorwitzcreate