22# This file is generated by mini_lambda_methods_generation.py - do not modify it !
33# ----
44from mini_lambda.main import C, make_lambda_friendly_class, make_lambda_friendly_method
5- from warnings import warn
5+ # from warnings import warn
66
77% for o in import_lines:
88${ o}
99% endfor
1010
1111% for o in to_create:
12+ % if o.import_line is None or len (o.import_line) == 0 :
13+ % if o.constant_name:
14+ ## CONSTANT
15+ ${ o.item_name} = C(${ o.constant_name} , '${ o.constant_name} ')
16+ % elif o.function_name:
17+ ## FUNCTION (except Format)
18+ % if o.function_name != ' Format' :
19+ ${ o.item_name} = make_lambda_friendly_method(${ o.function_name} , '${ o.function_name} ')
20+ % endif
21+ % else :
22+ ## CLASS
23+ ${ o.item_name} = make_lambda_friendly_class(${ o.class_name} )
24+ % endif
25+ % else :
1226try:
1327 ## IMPORT
1428 ${ o.import_line}
15- % if o.constant_name:
16- ## CONSTANT
29+ % if o.constant_name:
30+ ## CONSTANT
1731 ${ o.item_name} = C(${ o.constant_name} , '${ o.constant_name} ')
18- % elif o.function_name:
19- % if o.function_name != ' Format' :
20- ## FUNCTION
32+ % elif o.function_name:
33+ ## FUNCTION (except Format)
34+ % if o.function_name != ' Format ' :
2135 ${ o.item_name} = make_lambda_friendly_method(${ o.function_name} , '${ o.function_name} ')
22- % endif
23- % else :
24- ## CLASS
36+ % endif
37+ % else :
38+ ## CLASS
2539 ${ o.item_name} = make_lambda_friendly_class(${ o.class_name} )
26- % endif
40+ % endif
2741except ImportError as e:
28- warn("Error performing '${ o.import_line} ': " + str(e))
42+ # new: silently escape, as this is annoying
43+ # warn("Error performing '${ o.import_line} ': " + str(e))
44+ pass
45+ % endif
2946
3047
3148% endfor
0 commit comments