#NEWLINE# def _gen_init( self ) : #NEWLINE# #INDENT# src = ( 'class %s(Node):\n' % self . name ) #NEWLINE# if self . all_entries : #NEWLINE# #INDENT# args = ', ' . join ( self . all_entries ) #NEWLINE# slots = ', ' . join ( ( "'{0}'" . format ( e ) for e in self . all_entries ) ) #NEWLINE# slots += ", 'coord', '__weakref__'" #NEWLINE# arglist = ( '(self, %s, coord=None)' % args ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# slots = "'coord', '__weakref__'" #NEWLINE# arglist = '(self, coord=None)' #NEWLINE# #UNINDENT# src += ( '    __slots__ = (%s)\n' % slots ) #NEWLINE# src += ( '    def __init__%s:\n' % arglist ) #NEWLINE# for name in ( self . all_entries + [ 'coord' ] ) : #NEWLINE# #INDENT# src += ( '        self.%s = %s\n' % ( name , name ) ) #NEWLINE# #UNINDENT# return src