[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a project of around 6000 lines where I used count() 20 times. It > has 14 modules, 10 of which I needed an explicit import. > > Many of the usages are of the form: > > for item, n in zip(items, count(N)): > dostuff > > Around half of these are due to using pylab.subplot(x,y.n), which > requires values for n>=1. So I want N=1. The enumerate builtin starts > from 0.
Hmmm, makes me wonder if enumerate should grow optional arguments for starting and stepping... I've found myself in similar situations, using "x*i+y" on the i returned by enumerate, or zipping an xrange instead... Alex -- http://mail.python.org/mailman/listinfo/python-list