8def _make_wrapper(funcname):
9 def function(*args, **kwargs):
10 delim = kwargs.get('delim', ' ')
11
12 args_with_delim = [val for pair in zip(args, len(args)*[delim]) for val in pair][:-1]
13 return ROOT.ship.__dict__[funcname](*map(type, args_with_delim))(*args_with_delim)
14 docstring = '''\
15 Python wrapper around the C++ function template ship::{}(Types... args).
16
17 Keyword arguments:
18 delim -- delimiter to be inserted between each argument (default \' \')
19 '''.format(funcname)
20 return function, docstring
21