Terry J. Reedy <tjre...@udel.edu> added the comment:

Range objects are new in 3.0; they supersede 2.x xrange objects, which are 
perhaps 10 years old. I do not remember that xrange objects had such 
attributes. On the other hand, I believe there were requests.

The request, with either implementation, seems reasonable in that range objects 
could be regarded as iterable slice objects. The differences are that range 
objects have __getitem__, __iter__, and __reversed__ special methods while 
slice objects have start, stop, and stop real-only attributes and the indices 
method. (I could not really understand the last from the doc; I had to 
experiment.) Starting fresh, we might do with just one class instead of two.

I guess this makes me +0.3 at the moment.

----------
nosy: +terry.reedy
stage:  -> patch review

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9896>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to