Author belopolsky
Recipients belopolsky, loewis, rhettinger
Date 2008-02-23.02:22:59
SpamBayes Score 0.017112
Marked as misclassified No
Message-id <1203733380.84.0.535272464127.issue1540617@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2008-02-23 02:23:01belopolskysetspambayes_score: 0.017112 -> 0.017112
recipients: + belopolsky, loewis, rhettinger
2008-02-23 02:23:00belopolskysetspambayes_score: 0.017112 -> 0.017112
messageid: <1203733380.84.0.535272464127.issue1540617@psf.upfronthosting.co.za>
2008-02-23 02:22:59belopolskylinkissue1540617 messages
2008-02-23 02:22:59belopolskycreate