[Patches] [ python-Patches-1546078 ] xrange that supports longs, etc

SourceForge.net noreply at sourceforge.net
Mon May 7 19:51:59 CEST 2007


Patches item #1546078, was opened at 2006-08-24 09:20
Message generated for change (Settings changed) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1546078&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
>Group: Python 3000
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Neal Norwitz (nnorwitz)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: xrange that supports longs, etc

Initial Comment:
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.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-08-24 18:03

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1546078&group_id=5470


More information about the Patches mailing list