sum function

Ian Kelly ian.g.kelly at gmail.com
Fri Oct 5 15:29:04 EDT 2012


On Fri, Oct 5, 2012 at 7:39 AM, Mike <mike20007 at gmail.com> wrote:
> Sorry about that. Here you go
>
> Traceback (most recent call last):
>   File "test.py", line 17, in <module>
>     total = sum(float(col.value) for r in iter(next_r, None) for col in r[0].columns.itervalues())
>   File "test.py", line 17, in <genexpr>
>     total = sum(float(col.value) for r in iter(next_r, None) for col in r[0].columns.itervalues())
> IndexError: list index out of range

Maybe the sentinel value is not None as I assumed, and it's
overrunning the end of the data?  What does
client.scannerGet return when there is no more data?



More information about the Python-list mailing list