Project

General

Profile

« Previous | Next » 

Revision 2033

bin/map: Fixed bug in input rows processed count where the count would be off by 1, because the for loop would leave i at the index of the last row instead of one-past-the-last

View differences:

bin/map
193 193
            
194 194
            if end != None: row_nums = xrange(rows_start, end)
195 195
            else: row_nums = itertools.count(rows_start)
196
            i = 0
196 197
            for i in row_nums:
197 198
                try: row = rows.next()
198 199
                except StopIteration: break # no more rows
......
200 201
                
201 202
                process_row(row, i)
202 203
                row_ready(i, row)
203
            row_ct = i-start
204
            row_ct = i-start+1
204 205
            return row_ct
205 206
        
206 207
        def map_rows(get_value, rows, **kw_args):

Also available in: Unified diff