[pypy-dev] XRange Object [Fixed Patch]

holger krekel hpk at trillke.net
Tue Jul 8 13:32:24 MEST 2003


[Moshe Zadka Tue, Jul 08, 2003 at 10:21:52AM -0000]
> On Tue, 8 Jul 2003, holger krekel <hpk at trillke.net> wrote:
> 
> > thanks you for the patch.  But i think that "xrange" should really
> > be a builtin rather than a first-class type on stdobjspace.  
> 
> I disagree. For example, it should support methods such as tolist() and
> getitem(). Maybe you want a smarter iterator method...which is fine,
> look at the comment I put in the iterator method [roughly "this is
> a standin because I wanted to do the simplest thing"]

moshez and me (and michael) are continuing this discussion on IRC
(freenode: #pypy) and report back any results.  Basically Moshez is 
right that "xrange" is more than a generator (you never learn enough :-).  
But probably it's still possible to stuff the xrange-implementation 
completly into builtin_app.py 

cheers,

    hholger


More information about the pypy-dev mailing list