#NEWLINE# @ moduledef . method ( 'singleton_methods' , all = 'bool' ) #NEWLINE# def method_singleton_methods( self , space , all = True ) : #NEWLINE# #INDENT# methods = [ ] #NEWLINE# w_cls = space . getclass ( self ) #NEWLINE# if w_cls . is_singleton : #NEWLINE# #INDENT# methods . extend ( w_cls . methods_w . keys ( ) ) #NEWLINE# w_cls = w_cls . superclass #NEWLINE# #UNINDENT# if all : #NEWLINE# #INDENT# while ( w_cls and w_cls . is_singleton ) : #NEWLINE# #INDENT# methods . extend ( w_cls . methods_w . keys ( ) ) #NEWLINE# w_cls = w_cls . superclass #NEWLINE# #UNINDENT# #UNINDENT# return space . newarray ( [ space . newsymbol ( m ) for m in methods ] )