#NEWLINE# def __init__( self , constructor , dimensions , name = None , baserename = False ) : #NEWLINE# #INDENT# ':arg constructor: a constructor method that returns a module\n        :arg dimensions: tuple of dimensions. ' #NEWLINE# self . dims = dimensions #NEWLINE# if ( name != None ) : #NEWLINE# #INDENT# self . name = name #NEWLINE# #UNINDENT# self . components = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for coord in iterCombinations ( self . dims ) : #NEWLINE# #INDENT# tmp = constructor ( ) #NEWLINE# self . components [ coord ] = tmp #NEWLINE# tmp . name = ( self . name + str ( coord ) ) #NEWLINE# if ( baserename and isinstance ( tmp , ModuleSlice ) ) : #NEWLINE# #INDENT# tmp . base . name = tmp . name #NEWLINE# #UNINDENT# #UNINDENT# self . componentIndim = tmp . indim #NEWLINE# self . componentOutdim = tmp . outdim