[Python-3000] xrange vs. int.__getslice__

Ivan Krstic krstic at fas.harvard.edu
Tue Jul 4 01:58:59 CEST 2006


Vladimir 'Yu' Stepanov wrote:
> ---------------------------------------------
>         for i in xrange(100): pass
> vs.
>         for i in int[:100]: pass
> ---------------------------------------------

I'm a strong -1 on this; it makes it look like float[:100] should also
be legal and reasonable, but I can't see how it could possibly be.

-- 
Ivan Krstic <krstic at fas.harvard.edu> | GPG: 0x147C722D


More information about the Python-3000 mailing list