Alexander Belopolsky added the comment: Yes, index/longindex optimization is nice and can be applied to xrange. However, I don't think python-dev will be happy with the 1546078-style changes going to 2.6 and optimization patches are probably premature for 3.0.
The ssize_t approach has a nice property of not affecting 32-bit platforms where objects with offsets >2**31 cannot exist and will satisfy most of the needs on 64-bit platforms. I cannot think of a use case for xrange output that cannot be used as index. On the other hand, such functionality would be trivial to implement if needed by an application: def range(start, stop, step): i = start while i < stop: yield i i += step Maybe you could mark this issue as "easy" and see if the patch can be reviewed in one of the bugs days? _____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1540617> _____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com