[Python-bugs-list] [ python-Feature Requests-661057 ] xrange concatenation

noreply@sourceforge.net noreply@sourceforge.net
Thu, 02 Jan 2003 07:31:18 -0800


Feature Requests item #661057, was opened at 2003-01-02 07:29
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=661057&group_id=5470

Category: Python Library
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: paul rubin (phr)
Assigned to: Nobody/Anonymous (nobody)
Summary: xrange concatenation

Initial Comment:
xrange is advertised as working like range, but doesn't
support concatenation:

range(5) + range(6, 9) => [0,1,2,3,4,6,7,8,9]

[2] + range(3, 10, 2) => (2, 3, 5, 7, 9]

Doing these things with xrange throws an error.

It would be nice if xrange supported + for
concatenation, so
the above examples would work.  This should be easy to
implement now that there are iterator objects.

Paul


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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-01-02 10:31

Message:
Logged In: YES 
user_id=6380

I guess the docs need to be updated. xrange() is supposed to
be as light and fast as possible for a single use case: "for
i in xrange(...): ...". Everything else is fluff, and in
fact several features have been deprecated.

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

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