#NEWLINE# def __getitem__( self , key ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ( processor , obj , index ) = self . _keymap [ key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# ( processor , obj , index ) = self . _parent . _key_fallback ( key ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# if isinstance ( key , slice ) : #NEWLINE# #INDENT# l = [ ] #NEWLINE# for ( processor , value ) in zip ( self . _processors [ key ] , self . _row [ l ] ) : #NEWLINE# #INDENT# if ( processor is None ) : #NEWLINE# #INDENT# l . append ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# l . append ( processor ( value ) ) #NEWLINE# #UNINDENT# #UNINDENT# return tuple ( l ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# if ( index is None ) : #NEWLINE# #INDENT# raise exc . InvalidRequestError ( ( "Ambiguous column name '%s' in result set! try 'use_labels' option on select statement." % key ) ) #NEWLINE# #UNINDENT# if ( processor is not None ) : #NEWLINE# #INDENT# return processor ( self . _row [ index ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . _row [ index ]