Does anyone else use this little idiom?
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Sun Feb 3 16:50:18 EST 2008
On Sun, 03 Feb 2008 15:13:14 +1100, Ben Finney wrote:
> "Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> writes:
>
>> Should be `for _ in xrange(n)` to match the Ruby example. Both
>> iterate n times.
>
> Only until Python 3.0, since the 'xrange' implementation will become
> 'range' at that time.
The point wasn't `range` vs. `xrange` but the arguments (1,n) vs. (n).
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list