[Patches] [ python-Patches-559833 ] Expose xrange type in builtins

noreply@sourceforge.net noreply@sourceforge.net
Thu, 23 May 2002 13:52:22 -0700


Patches item #559833, was opened at 2002-05-23 15:52
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=559833&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Nobody/Anonymous (nobody)
Summary: Expose xrange type in builtins

Initial Comment:
The attached patch to rangeobject.c and bltinmodule.c exposes the
xrange type in te builtins module instead of a function.  The test suite 
passes.  The one obvious problem I'm aware of is that I simply copied 
get_len_of_range from bltinmodule.c, so it's now duplicated (it's used 
by range_new() as well).  I didn't want to create another _Py_* 
symbol just to share this little bit of code.  I'll be happy to resolve this 
problem however seems best. 

Skip


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

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