#NEWLINE# def search( self , doc ) : #NEWLINE# #INDENT# for path in self . paths : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return reduce ( ( lambda obj , attr : obj [ attr ] ) , path , doc ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass