#NEWLINE# def __next__( self ) : #NEWLINE# #INDENT# record = next ( self . cursor ) #NEWLINE# if ( not record ) : #NEWLINE# #INDENT# raise StopIteration #NEWLINE# #UNINDENT# if self . expand : #NEWLINE# #INDENT# row = [ ] #NEWLINE# for field in self . field_names : #NEWLINE# #INDENT# value = record #NEWLINE# for key in field . split ( '.' ) : #NEWLINE# #INDENT# if ( key in value ) : #NEWLINE# #INDENT# value = value [ key ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# array . append ( value ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# row = [ record [ field ] for field in key . field_names ] #NEWLINE# #UNINDENT# return row