#NEWLINE# def __getattr__( self , key ) : #NEWLINE# #INDENT# assert ( key != '_hash' ) , ( '%s expressions should set _hash in __init__' % type ( self ) . __name__ ) #NEWLINE# try : #NEWLINE# #INDENT# result = object . __getattribute__ ( self , key ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# fields = dict ( zip ( map ( valid_identifier , self . fields ) , self . fields ) ) #NEWLINE# methods = toolz . merge ( schema_methods ( func . dshape . measure ) , dshape_methods ( self . dshape ) ) #NEWLINE# if ( key in methods ) : #NEWLINE# #INDENT# func = methods [ key ] #NEWLINE# if ( func in method_properties ) : #NEWLINE# #INDENT# result = func ( self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = boundmethod ( func , self ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . fields and ( key in fields ) ) : #NEWLINE# #INDENT# if isscalar ( self . dshape . measure ) : #NEWLINE# #INDENT# result = self #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = self [ fields [ key ] ] #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# setattr ( self , key , result ) #NEWLINE# return result