Section "3.1.6 Reading (and selecting) data in a table"
in the tutorial
sayes (approximately) that in the call like
[x['idnumber'] for x in table.iterrows()]
we can ommit itertools() and write
[x['idnumber'] for x in table]
It is all true, but in one situation, when the table
has no rows, than
the call with iterrows() will return empty list, while
the call that
relies on __iter__() will raise an exception:
TypeError: iter() returned non-iterator of type 'RecArray'
Attached example that shows the problem in action.