Hari Krishna Dara wrote: > On Sun, 3 Sep 2006 at 12:53pm, Bram Moolenaar wrote: > > > > Can't you use something like: > > > > for loop_index in range(1, 10) > > <body> > > endfor > > As I said in my reply to Tony, this is inefficient when the range is > big,
What performance degradation have you noticed then? > and to avoid this problem Python has irange() which is an > enumeration. Now adding enumerations to Vim will be a non-trivial > change (and unnecessary complication, as we are not trying to achieve a > full fledged scripting language), but adding a for loop variant should > be much simpler. I looked into something like Python's xrange(), but it's a messy solution. And I don't think it actually improves the performance. I don't know what irange() is. I only find something about it in a rejected PEP. I don't know what you mean with "loop variant". -- Yah, well, we had to carve our electrons out of driftwood we'd find. In the winter. Uphill. Both ways. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///