#NEWLINE# def ischild( node , attr ) : #NEWLINE# #INDENT# if ( not isinstance ( node , Node ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# excludes = ( 'coord' , 'attr_names' ) #NEWLINE# if attr . startswith ( '__' ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( attr_test in excludes ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# attr_names = getattr ( node , 'attr_names' ) #NEWLINE# if ( attr in attr_names ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# attr_test = getattr ( node , attr ) #NEWLINE# if hasattr ( attr_test , '__call__' ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# return True