[Python-3000] xrange vs. int.__getslice__
Boris Borcic
bborcic at gmail.com
Tue Jun 13 16:34:18 CEST 2006
Vladimir 'Yu' Stepanov wrote:
> 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
> ---------------------------------------------
in a similar vein (slices on types)
-----------------------------------------------
(slice(1,10),Ellipsis,slice(1,10))
vs
slice[1:10,...,1:10]
-----------------------------------------------
Boris
--
"On naît tous les mètres du même monde"
More information about the Python-3000
mailing list