Make sure one passes the expected number of arguments
(arguments, wrong=operator.ne, msg='')
| 330 | dispatch_str = '(%s,)' % ', '.join(dispatch_args) |
| 331 | |
| 332 | def check(arguments, wrong=operator.ne, msg=''): |
| 333 | """Make sure one passes the expected number of arguments""" |
| 334 | if wrong(len(arguments), len(dispatch_args)): |
| 335 | raise TypeError('Expected %d arguments, got %d%s' % |
| 336 | (len(dispatch_args), len(arguments), msg)) |
| 337 | |
| 338 | def gen_func_dec(func): |
| 339 | """Decorator turning a function into a generic function""" |
no outgoing calls
no test coverage detected