xrange question
Courageous
jkraska1 at san.rr.com
Tue May 8 01:02:24 EDT 2001
On Mon, 7 May 2001 23:10:58 -0400, "Tim Peters" <tim.one at home.com> wrote:
>[John Flynn]
>> ...
>> Out of curiosity, at what point do you find that 'xrange' becomes
>> most useful?
>
>When and only when I'm writing a general function that I need to make
>idiot-proof: if someone may pass in 2000000000 as a loop bound, then
>xrange() is the only way to go (at least until next year's machine's come out
><wink>).
>
>BTW, stop worrying about this -- it's not worth it. Even the "speed"
>arguments are half bogus, as the ...
2000000000
But the memory requirements become pretty severe for values of
n quite a bit less than 2000000000, yes?
C//
More information about the Python-list
mailing list