def generate_fused_type(codes):
 cytypes = map((lambda x: CY_TYPES[x]), codes)
 name = (codes + '_number_t')
 declaration = [(('ctypedef fused ' + name) + ':')]
 for cytype in cytypes:
  declaration.append(('    ' + cytype))
 declaration = '\n'.join(declaration)
 return (name, declaration)

def generate_fused_type ( codes ) : cytypes = map ( ( lambda x : CY_TYPES [ x ] ) , codes ) name = ( codes + '_number_t' ) declaration = [ ( ( 'ctypedef fused ' + name ) + ':' ) ] for cytype in cytypes : declaration . append ( ( '    ' + cytype ) ) declaration = '\n' . join ( declaration ) return ( name , declaration )
generate name of and cython code for a fused type .