On 05/07/2016 03:46 AM, Sibylle Koczian wrote:
Am 06.05.2016 um 16:46 schrieb john:
On 05/06/2016 07:43 AM, john wrote:
BTW here is the source for __iter__
Which __iter__, in which class?
def__iter__(self):ifself._prefetch:res
=super(DictCursorBase,self).__iter__()first
=res.next()ifself._query_executed:self._build_index()ifnotself._prefetch:res
=super(DictCursorBase,self).__iter__()first =res.next()yieldfirst
while1:yieldres.next()
This has been badly mangled on the way, as you see. I failed to
restore the missing indentation at the second "if". Could you try
again, or tell me where this comes from?
Thank you,
Sibylle
Sorry about that - the code is from psycopg2.extras. Which is the way I
get a DictCursor.
https://github.com/psycopg/psycopg2/blob/master/lib/extras.py
That's where code is stored.
Johnf
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]