[Python-3000] xrange vs. int.__getslice__
Vladimir 'Yu' Stepanov
vys at renet.ru
Tue Jun 13 09:34:12 CEST 2006
You were bothered yet with function xrange ? :) I suggest to replace it.
---------------------------------------------
for i in xrange(100): pass
vs.
for i in int[:100]: pass
---------------------------------------------
---------------------------------------------
for i in xrange(1000, 1020): pass
vs.
for i in int[1000:1020]: pass
---------------------------------------------
---------------------------------------------
for i in xrange(200, 100, -2): pass
vs.
for i in int[200:100:-2]: pass
---------------------------------------------
More information about the Python-3000
mailing list