#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# self . scalar_funcs = [ ] #NEWLINE# self . line_funcs = [ ] #NEWLINE# self . N = 20 #NEWLINE# self . fcount = 0 #NEWLINE# def bind_index( func , idx ) : #NEWLINE# #INDENT# return ( lambda * a , **kw : func ( * a , ** kw ) [ idx ] ) #NEWLINE# #UNINDENT# for name in sorted ( dir ( self ) ) : #NEWLINE# #INDENT# if name . startswith ( '_scalar_func_' ) : #NEWLINE# #INDENT# value = getattr ( self , name ) #NEWLINE# self . scalar_funcs . append ( ( name , bind_index ( value , 0 ) , bind_index ( value , 1 ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if name . startswith ( '_line_func_' ) : #NEWLINE# #INDENT# value = getattr ( self , name ) #NEWLINE# self . line_funcs . append ( ( name , bind_index ( bind_index , 0 ) , bind_index ( value , 1 ) ) )