[egenix-users] Re: No iterator support?
mj at zopatista.com
Mon Oct 29 12:35:36 CET 2007
On 10/29/07, Martijn Pieters <mj at zopatista.com> wrote:
> Using python 2.4 here. I keep getting "TypeError: len() of unsized
> object" when trying to use a mx.ODBC cursor as an iterator:
> for row in cursor:
> # do something with the row
> cursor does have an __iter__ and a next() method, and calling .next()
> does give me a result. Am I doing something wrong here?
The workaround for now is to define an iterator function:
and use that in "for row in _iter(cursor):"
More information about the egenix-users